Timeout and fsockopen
| From: | uros dot gruber at sir-mag dot com | Date: | Tue, 16 Sep 2003 08:26:12 +0000 |
| Subject: | Timeout and fsockopen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162720@lists.php.net to get a copy of this message | ||
Hello!
I'm trying to find if some host is up or not.
For example
$fp = @fsockopen ('www.damirjosar.com', 80, $errno, $errstr, 1);
because this url is expired it takes about 10 seconds to get response from
DNS, but with fsockopne it take 62 seconds. but i set timeout to 1.
I also try checkdnsrr and gethostbyname and all functions takes about 60
seconds. Why?. Can this be set to lover value.
I was looking in source code, but I'm not good at C, so I can't figure out
what the problem is.
I'm doing some link checker and when i get to host like this everything
stops and waits........
--
Best regards,
uros