<?php
include('./curl.wrapper.php');
$curl = new CCurlWrapper();
if($curl->InitEx() === false)
die('Unable to init the CURL library' . "\n");
// request
$curl->Exec('http://fr.wikipedia.org/wiki/User-Agent');
echo 'HTTP Code: ' . $curl->GetReturnCode() . "\n";
$i_ft = $curl->GetFileTime();
if($i_ft!= -1)
echo 'File time: ' . $i_ft . "\n";
else
echo 'File time: Unavailable' . "\n";
echo 'Total time: ' . $curl->GetTotalTime() . "\n";
echo 'DNS Resolve time: ' . $curl->GetNameLookupTime() . "\n";
echo 'Connect time: ' . $curl->GetConnectTime() . "\n";
echo 'Pre-transfer time: ' . $curl->GetPreTransferTime() . "\n";
echo 'Start transfer time: ' . $curl->GetStartTransfertTime() . "\n";
$redir_count = $curl->GetRedirectCount();
echo 'Number of redirection: ' . $redir_count . "\n";
if($redir_count > 0)
{
echo 'Final URL: ' . $curl->GetEffectiveUrl() . "\n";
echo 'Rediection time: ' . $curl->GetRedirectTime() . "\n";
}
echo 'Upload size: ' . $curl->GetSizeUpload() . "\n";
echo 'Upload speed: ' . $curl->GetSpeedUpload() . "\n";
echo 'Download size: ' . $curl->GetSizeDownload() . "\n";
echo 'Download speed: ' . $curl->GetSpeedDownload() . "\n";
echo 'Content type: ' . $curl->GetContentType() . "\n";
?>
|