I have created php curl to send xml request as under, where it seems that login works. because if there is anything wrong in login detail then it shows error. but if everything is ok then it give response in some garbage value:
Source main code :
$contentlength=strlen($postdata);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL =>$this->url ,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "$postdata",
CURLOPT_HTTPHEADER => array(
"Content-Type: text/xml;charset=utf-8",
"Content-Length: 839",
"Accept: text/xml",
"Accept-Encoding: gzip",
"Authorization : $Authorization",
"User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11",
"Host: $host",
"Connection: close"
),
));
Ouput looks like this :
‹d1oÂ0…÷üŠS–,Û)J›ÈuèÔ"$–²šäH£Æv°MUþ}MÒ€J·»{ŸŸï_}«¾ÐºÖèeÂæ4Ô•©[Ý,““?¤OÉJDÜ¢ëv¸ïLõyåã‡yþ‹ Ç:oñ€6 x
what is wrong ? should i decode anything ? if yes then in which forgat i need to debug. I use securetrading.com site to send xml request.