Site scraping

Discussion in 'PHP' started by Fracisc, May 13, 2015.

  1. #1
    Hey there!

    I need to scrape a site, many pages and get the content of a specific DIV. How can I return in one page the entire site content. There are 10 pages I need to scrape, so the scraping should be the content of those 10 pages in one result.

    Thanks!
     
    Fracisc, May 13, 2015 IP
  2. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #2
    I prefer using curl. You can either make a loop if you know all 10 urls or start with the page that you know and parse the other 9 urls from that page and just call the curl function again. See the example here http://codular.com/curl-with-php
     
    Anveto, May 13, 2015 IP