Quick Queston to know if its possible or not

Discussion in 'PHP' started by crooklyn, Sep 23, 2010.

  1. #1
    Is it possible to create a php script that will pull out selected portions of other websites or rss feeds and place them in another website while keeping them updated?

    Example would be to grab the upto date info in the middle of this:
    http://www.bchighway.com/highway-closures-news-feed

    and just display the info in a different form on another site?
     
    crooklyn, Sep 23, 2010 IP
  2. RadioBounce

    RadioBounce Banned

    Messages:
    4,171
    Likes Received:
    16
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Yep, I think that's possible.
     
    RadioBounce, Sep 23, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    Thats possible...

    If its an RSS/XML your trying to scrape:

    You can use the simplexml_*() function/s or the DOMDocument class.

    If its a website/page in general your trying to scrape:

    1. You'd first grab the contents of the remote page using cURL or the file_get_contents() function (theirs a few other functions/methods such as the fsockopen() function but these are the most popular).

    2. Then extract the specific content using a regex with the appropriate preg_*() function (again theirs a few other functions/methods such as HTML DOM and explode() but this is the most popular).
     
    Last edited: Sep 23, 2010
    danx10, Sep 23, 2010 IP
  4. sunlcik

    sunlcik Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    1.php script (catch the content,regex)
    2.crontab

    perfect complete...
     
    sunlcik, Sep 25, 2010 IP
  5. zappak

    zappak Active Member

    Messages:
    366
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    80
    #5
    yup.. this is possible and I can do this up

    let me know if you want to get this done

    Thanks
     
    zappak, Sep 26, 2010 IP