I have a web services and I use CURL to get the data, However this web services set up as XML output and I want to convert it to array to use the result in the web form.
My CURL is
$cnum="$mn";
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://xxx.pl');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS ,"cnum=$cnum");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = htmlspecialchars(curl_exec($ch));
curl_close($ch);
echo"<pre>";
echo $file_contents;