I have a PHP-page that fetches information from another site, BUT the problem is that the site sometimes is not available or extremely slow. Hence, I would like to check if the site is online, prior to fetching the information from the site. How do I do that in the best way?
I have tried to use both
Is there someway to set a timeout-limit?
Thanks in advance,