is there any way with PHP to reduce the timeout for a page not found. I’m checking some external URLs and sometimes the script fails when the URL is no longer valid…
@NogDogMay 22.2008 — #You could try this: [code=php] $timeout = 5; // seconds ini_set('default_socket_timeout', $timeout); $result = @file_get_contents('http://somesite.com/page.html'); if($result === false) { echo "Connection not established after $timeout seconds."; } else { // do whatever you want to do with $result. } [/code]