I'm pulling from a RSS feed:
If you navigate to that with a browser, you get a nice xml page.
However, if I do
simplexml_load_file("the above url");
in php, I get
1: parser error : Document is empty
1: parser error : Start tag expected, '<' not found in my_file
So why can the browser get it but not PHP?
If I do file_get_contents("the above url")
the function fails with FALSE returned.
The site is blocking requests from PHP.
First run
(or some other valid user agent) and it will work.