CURL PHP: Get information regarding a specific transfercurl_getinfo — Get information regarding a specific transfer – curl_getinfo()
Wednesday, June 10, 2009 22:57Posted in category CURL PHP Examples
No Comments
<?php
// Create a curl handle
$ch = curl_init('http://www.yahoo.com/');
// Execute
curl_exec($ch);
// Check if any error occured
if(!curl_errno($ch))
{
$info = curl_getinfo($ch);
echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
}
// Close handle
curl_close($ch);
?>
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.


