Hello,
I am getting response as xml from curl request. so i am sending these into an array. but after execution of code i am getting this warning
1)Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in C:\wamp\www\newlivebackup\admin\subscribers.php on line 65
2)Warning: simplexml_load_string() [function.simplexml-load-string]: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx in C:\wamp\www\newlivebackup\admin\subscribers.php on line 65
3)Warning: simplexml_load_string() [function.simplexml-load-string]: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx in C:\wamp\www\newlivebackup\admin\subscribers.php on line 65
Here is my code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Content-Length: " . strlen($req)));
curl_setopt($ch, CURLOPT_HEADER , 0);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$curl_result = @curl_exec($ch);
$curl_err = curl_error($ch);
curl_close($ch);
//echo $curl_result;exit;
// parse the data
$curl_result = trim($curl_result);
$xml = (array) simplexml_load_string($curl_result);