billymcqueary
asked on
PHP SimpleXML load file not working with URL source
I am trying to load an xml file from a remote URL. The code below works just fine when I point to a local file. However when I use a remote file I get the following error. Is there some sort of encoding or datatype change I need to do when passing in a URL instead of a local file?
*****
simplexml_load_file(http://www.mcqnet.net/files/test.xml) [function.simplexml-load-f ile]: failed to open stream: No such file or directory
******
*****
simplexml_load_file(http://www.mcqnet.net/files/test.xml) [function.simplexml-load-f
******
$xml = simplexml_load_file('http://www.mcqnet.net/files/test.xml');
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
PHP 5.24
I am not sure off hand if it affects simplexml_load_file, but allow_url_fopen is On.
I am not sure off hand if it affects simplexml_load_file, but allow_url_fopen is On.
ASKER
I think I may have discovered the problem. I will report back on that.
ASKER
What version of PHP are you running?