pulling file from other web site
I am trying to build a web site that read RSS from other websites and use them.
The first step the way I see it is for the php to download the xml file and then parse it.
So my question is what command can I use in php in order to download file from other server?
There are a few ways you could do it and mostly it will depend on the set up of the server you are running on.
file_get_contents() - Your hosting provider may not allow you to pull data from other servers in this way. Give it a try though (also look into other related file functions)
curl - Your hosting provider may not allow the use of curl or it may not be included with your php setup. Also, give it a go...its worth knowing Everything you need to know is here : http://php.net/manual/en/book.curl.php
I suspect there are many 3rd-party PHP scripts/classes out there you could use to do this, too. After all, it's not as if no one has ever wanted to process an RSS/ATOM feed before.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread