Hi

I'm using 

$fp=fsockopen($URL,80, &$errno, &$errstr,10); 
set_socket_blocking($fp,false);

to get the HTML from a remote site and monitor how long it took me to DL
the HTML.

The next lines are like this :

if ($fp) {
        $SendGetStart = getmicrotime();
        fwrite($fp,"GET / HTTP/1.1\r\n");
        fwrite($fp,"Accept: */*\r\n");
        fwrite($fp,"Accept-Language: en-us\r\n");
        fwrite($fp,"Proxy-Connection: Keep-Alive\r\n");
        fwrite($fp,"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5;
Windows NT 5.0; COM+ 1.0.2204)\r\n");
        fwrite($fp,"Host:$Host\r\n\r\n");

..........

        While(!feof($fp)) {...............


The weird thing is that it seems the EOF comes in great delay. When I
print the HTML I get from the remote site, the while loop continues for
about 10-15 seconds after the last </HTML> tag arrived. This is for any
site I check so it's not something specific to the web server I'm
testing. 

Anyone has any idea why?

Thanks

berber

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to