Page is a not externally linkable
camilord - 7:23 pm on Feb 4, 2009 (gmt 0)
<?php $userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'; // Create a curl handle to a non-existing location // add useragent // Check if any error occured echo '<hr>Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url']; // Close handle ?> [edited by: coopster at 8:33 pm (utc) on Feb. 4, 2009]
I'm about to give up.. thanks God.. it's solved... :)
$ch = curl_init('http://www.example.com/wb/wxfcst.html');
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
// Execute
curl_exec($ch);
if(!curl_errno($ch))
{
$info = curl_getinfo($ch);
}
curl_close($ch);
[edit reason] please use example.com in code [/edit]