Page 1 of 1

Fatal error: Maximum execution time

Posted: Sat Jun 05, 2010 1:29 am
by programec
try {}catch(){} is not working for this ....
i donot want to increase time of executtion ...

Code: Select all

if($Content = file_get_contents($url,FALSE,NULL,0,10) //if successfully get content in 10 seconds
{
        run code ....
}
else if(time exceed by 10 second)then
{
         run this code 
}
how to do this ....

Re: Fatal error: Maximum execution time

Posted: Sat Jun 05, 2010 1:40 am
by Benjamin
:arrow: Moved to PHP - Code

Re: Fatal error: Maximum execution time

Posted: Sat Jun 05, 2010 9:56 am
by Eran
You should use cURL instead if you want to control the maximum timeout.

try-catch works for exceptions, not fatal errors.