Is there code that can grab content from a website and log it to a file?

Discussion in 'Programming' started by skullcane, Sep 17, 2011.

  1. #1
    I'm looking for some kind of script or code that can do the following:


    Whenever a person visits: http://mysite.com/file.php it'll secretly load the link of another website http://targetsite.com and grab the entire content on the page based on what the visitor would see if he had visited http://targetsite.com directly.


    It would log the content on my server as a .txt file or something like that


    Heres a diagram to make it more clear:


    http://i.imgur.com/SwYAE.png
     
    skullcane, Sep 17, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    libcurl will let you do that. It's probably the easiest screen scraper there is. (That's what you're doing, screen-scraping and keeping the entire screen.)
     
    Rukbat, Sep 18, 2011 IP