On my site, I include some news from a 3rd party website (XML). To do this, I must fopen the XML page on the 3rd party site each time it is loaded. The problem is that the 3rd party site goes down every once in a blue moon, and when people go to MY site, it waits for a long time trying to connect to the 3rd party site, giving an appearance that MY site is down.
My question is, how do I tell PHP to wait a certain amount of time, say 5 seconds, and if the information is not received by then, set a flag that the connection was false. That way I can disable the news and say that there is a problem, instead of having to manually disable it and re-enable it once i realize their site is back up...
Thanks.