CURL response is not readable
I have a problem with my cURL response, when I try to call the WSDL method, I get this weird text from my browser,
d ْ < _ [ 7 4eS @ 8 ] Q A > t , ] 1 %Y 4!l ^ZG ,8 v #ZJ W
r)0Ek Q "Ᏹ ! 0 0 ( T $ Z փ UU g & C f
8 ! 5 L t{ 6 ?{jY Q ? K 3 D2 e ߱Oc @^P $ IΠ 4A[; p \7 i5 + \歖~= ) a L GJey F Ɍ v] < z N \z . i: S5 FgkM hS |,\ 0 E9i= +ӄ !^WҶ 7 0 w +b ۹ [ ; fE4_ڑ u Q)E ; ; JL Ԩ 1 7[ $D \ W ۂU$9
How can I solve this?
Here's my title
$headers = array(
"Accept-Encoding: gzip, deflate",
"Content-Type: text/xml;charset=\"UTF-8\"",
"SOAPAction: \"http://tempuri.org/"",
"Host: domain.com",
"Content-length: ".strlen($xml_post_string),
"Connection: Keep-Alive"
);
and here are my options for curling
curl_setopt($soap_do, CURLOPT_URL, $url);
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 120);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 120);
curl_setopt($soap_do, CURLOPT_AUTOREFERER, true); // new
curl_setopt($soap_do, CURLOPT_MAXREDIRS, 10); // new
curl_setopt($soap_do, CURLOPT_FOLLOWLOCATION, true); // new
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true );
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xml_post_string);
curl_setopt($soap_do, CURLOPT_VERBOSE, TRUE);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $headers);
+3
source to share