dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: pulling file from other web site

  1. #1
    Join Date
    Feb 2011
    Posts
    90

    pulling file from other web site

    Hi,

    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?

  2. #2
    Join Date
    Mar 2009
    Location
    Yorkshire
    Posts
    266
    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

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,614
    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

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles