I have a PHP script that needs to process the same site's RSS feed. Specifically, I'm displaying the most recent blogs from the WordPress RSS feed on the home page. On our staging server it worked fine but on our live (which is a completely different, but LAMP) hosting environment it's not working.
I can run file_get_contents
or curl
on a remote url fine, but when I try to retrieve our own RSS feed, I am returned a 404 not found page. One other oddity, if I try file_get_contents(http://domain.com/test.txt)
it fails with a 404 but if I do file_get_contents(http://www.domain.com/test.txt)
I get the contents of the test text file. This is all assuming I'm running the script from domain.com (not www.domain.com)
I've setup an example here: http://bkwld.com/test.php