note 29245 added to function.curl-exec

From: Date: Fri, 07 Feb 2003 09:56:17 +0000
Subject: note 29245 added to function.curl-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-43546@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"); ?> -- http://www.php.net/manual/en/function.curl-exec.php http://master.php.net/manage/user-notes.php?action=edit+29245 http://master.php.net/manage/user-notes.php?action=delete+29245 http://master.php.net/manage/user-notes.php?action=reject+29245

« previous php.notes (#43546) next »