curl-and-php
Error 28 - timeout - on a working specific web site
From: <chardon1_at_club-internet.fr>
Date: Sun, 13 Apr 2008 23:33:43 +0200
Flashmail
Date: Sun, 13 Apr 2008 23:33:43 +0200
Hello,
The following code works with google url but not with the other url, (the commented line) I get a curl error 28 (timeout).
I don't know why. It looks strange, because i can access it with browsers from outside. and I see the curl GET requests on the web server (because it's a home-hosted webserver)
Can you help me?
Thank you
David
<?php
$ch = curl_init();
//curl_setopt($ch, CURLOPT_URL, "http://89.82.253.168/apache2-default/index.html");
curl_setopt($ch, CURLOPT_URL, "http://www.google.fr/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 32000);
curl_exec($ch);
if (curl_errno($ch))
{
print curl_errno($ch);
print curl_error($ch);
}
else
{
curl_close($ch);
}
?>
$ch = curl_init();
//curl_setopt($ch, CURLOPT_URL, "http://89.82.253.168/apache2-default/index.html");
curl_setopt($ch, CURLOPT_URL, "http://www.google.fr/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 32000);
curl_exec($ch);
if (curl_errno($ch))
{
print curl_errno($ch);
print curl_error($ch);
}
else
{
curl_close($ch);
}
?>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-04-13