Handle time-outs and errors with file()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm using file() to get the contents of a remote page in my script but
I cannot find any information regarding how I could *gracefully*
handle a broken network connection or even a time-out (slow
connection).

Is there a way?

---
Example:
$menu = file('http://www.remotesite.org/mypage.html');
foreach ($menu as $line_num => $line) {
    echo $line."\n";
}

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux