I have .net web service which i need to call using CUrl in php. Can anybody tell me how to achieve this? Below is my code which is not working and throwing Server Error.
Thanks in advance
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"sample url"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "APIKey=sample&sku=&UPC"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); $server_output = curl_exec($ch); print_r($server_output); curl_close ($ch);
Please see below error for more information:
Advertisement
Answer
I have used nusoap libraries to call the .net webservices.
Check below link:
https://www.codeproject.com/Articles/140189/PHP-NuSOAP-Tutorial