davidchardonnet
Programmer
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
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
Code:
<?php
$ch = curl_init();
//curl_setopt($ch, CURLOPT_URL, "[URL unfurl="true"]http://89.82.253.168/apache2-default/index.html");[/URL]
curl_setopt($ch, CURLOPT_URL, "[URL unfurl="true"]http://www.google.fr/");[/URL]
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);
}
?>