residual Posted May 1, 2009 Share Posted May 1, 2009 Is there a way to check if a xml stream is up and working prior to calling the simplexml-load-file function? For instance. I call this stream: simplexml_load_file(http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=ocr%20envy) which works 80% of the time, however if the stream is offline it returns "Service Unavailable". The simplexml function spits out an error and does not continue the script. Warning: simplexml_load_file(http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=ocr%20envy) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 503 Link to comment https://forums.phpfreaks.com/topic/156423-simplexml-load-file-check-stream/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.