I have an XML function that retrieves some data from another server. Everything works well most of the time but I'm looking for a way to use an alternate method of what I'm trying to accomplish if the first method doesn't respond in a given amount of time. I don't want the users to have to wait too long and I never want an ugly script timeout error.
In other words, if plan A doesn't respond in 10 seconds, go to plan B. Does anyone know how I can do this?