note 29245 deleted from function.curl-exec by tix
| From: | tix@php.net | Date: | Fri, 07 Feb 2003 12:56:21 +0000 |
| Subject: | note 29245 deleted from function.curl-exec by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43554@lists.php.net to get a copy of this message | ||
If I wanna try to execute following code my PHP stops at the curl_exec line :(
Anyone knows why?
It doesn't output any errors or something like that, it's just like a simple exit();
<?php
function newSend($info){
echo "<b>Using curl socket on test site...</b><br>";
echo "<b>Sent XML:</b> ".htmlspecialchars($info)."<Br>";
flush();
$ch = curl_init();
$DeveloperName="airbone";
$ApplicationName="planetquake";
$SessionCertificate="foobar";
$cert="X-EBAY-API-SESSION-CERTIFICATE:"
$cert.=$DeveloperName.";".$ApplicationName.
";".$SessionCertificate;
$compat="X-EBAY-API-COMPATIBILITY-LEVEL:245";
$headers[]=$cert."\r\n\r\n".$compat."\r\n\r\n";
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_URL, "https://api-test.ebay.com/aw-cgi/api.dll?");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $info);
curl_setopt($ch, CURLOPT_POST, 1);
$test=curl_exec($ch);
echo "Info:".$test;
if(curl_error($ch)){
echo curl_error($ch);
}
curl_close ($ch);
return $test;
}
echo newSend("somecodetopost");
?>