I use DOMDocument::load() to load a xml file.
$doc = new DOMDocument();
$doc->load("http://url_of_some_xml_file");
When the xml file indicated by the url fails to load( this I cannot control ), load() throws the following errors and stops the execution of all php code after that-
DOMDocument::load(http://url_of_some_xml_file) [domdocument.load]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://url_of_some_xml_file"
@ cannot be used to comment errors thrown by DOMDocument::load()
Can someone please let me know how I can stop DOMDocument::load() from throwing errors or stop the errors from showing?
Thanks in advance,
Nil111