Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php curl fail verbosly

curl_setopt($handle, CURLOPT_VERBOSE, true);

$verbose = fopen('php://temp', 'w+');
curl_setopt($handle, CURLOPT_STDERR, $verbose);
$result = curl_exec($handle);
if ($result === FALSE) {
    printf("cUrl error (#%d): %s<br>
", curl_errno($handle),
           htmlspecialchars(curl_error($handle)));
}

rewind($verbose);
$verboseLog = stream_get_contents($verbose);

echo "Verbose information:
<pre>", htmlspecialchars($verboseLog), "</pre>
";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #curl #fail #verbosly
ADD COMMENT
Topic
Name
7+7 =