lexxwern
asked on
Web Services; Sending POST Data
I have an external web service. I use SimpleXML to read the results of that service. The web service docs tell me that I have to pass parameters as POST variables. How do I do that?
(Php Code Attached)
How can I send $parameters to the web service via POST to get the right result.
(Php Code Attached)
How can I send $parameters to the web service via POST to get the right result.
<?php
$webServicePath = "http://web.service.url/path.php";
$parameters = "...";
$result = simplexml_load_file($webServicePath);
?>
I recommend http://www.xajaxproject.org. Easy simple to use from php and has all you need.
To send post data you need to use curl to fetch the result and then use simplexml_load_string()
See http://www.php.net/curl
To send post data you need to use curl to fetch the result and then use simplexml_load_string()
See http://www.php.net/curl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great stuff, thanks.
ASKER
Thanks,