file io - How do I load the contents of an rss feed rendered by php? -
WordPress is providing an RSS feed, but of course there is not really a file. I am writing a script to read and present RSS, but fails to load as an XML file, because there is not actually a file I write:
$ Rss = simplexml_load_file ('/ news / feed / rss /');
And I get this error:
Warning: simplexml_load_file () [function.simplexml-load-file]: I / O Alert: loading I still get this error by using file_get_contents: Warning: file_get_contents (/ news / feed / rss) /) [Function.file-get-content] : Failed to open the stream: any such file or directory
redirecting URL Because the file is not, but you have to file it as X Are trying to c. Assume that you have the correct phopan wrapper (and everyone does), try opening the simple XML to the URL:
$ rss = simplexml_load_file ('http://myurl.com/news / Feed / rss / ');
Comments
Post a Comment