Reputation: 4539
I have get weather from remote web using simplexml_load_file()
function.
It's works fine in normal condition.But when Internet is not available then my script wait for long time for response.
I have execute php page from embedded board not from browser.
So I want to put time out for that.
Is it possible to put connection time out in simplexml_load_file()
?
If any other alternative then please tell me.
Upvotes: 1
Views: 1463
Reputation: 12635
You are looking for the PHP function called set_time_limit()
, which allows you to cap the execution time of a PHP script.
Upvotes: 1