I'm working a project to request data from api service by sending XML data. The programming language used is PHP
. I have done so much research on the internet and nothing turned up except for using cURL. Is there any other way using PHP to achieve this.
<?php
$xml_data = '<mainservice>
<customer>
<appln_id>myid</appln_id>
<password>mypasss</password>
<cust_id>1234</cust_id>
</customer>
</mainservice>';
This is the data that needs to be send. The id
and password
is for authenticating the API service and cust_id
for retrieving data of that particular customer.
The Result data is also in XML format.
NOTE The service accepts only POST data.