Andrew R Posted October 26, 2010 Share Posted October 26, 2010 Hi there. How do I stop a function from running it it's taking to long to proccess. For example, say after 10 seconds the code is still working I display an error message? As you can in the following code it's pulling the contents from an url or file which might take too long to load. function Tester($url); { return file_get_contents($url); } Thanks a mil Quote Link to comment Share on other sites More sharing options...
Anti-Moronic Posted October 26, 2010 Share Posted October 26, 2010 This will likely interest you: http://php.net/manual/en/function.set-time-limit.php Hope that helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.