scrapping php code for scrapping shopping website product details

Discussion in 'PHP' started by ajayto, Oct 30, 2009.

  1. #1
    Hi all,

    I am working in company and i am new in php .. we need one php content scrapping code .. how i can develop it any idea or help or any site which help me about it.. i have no idea about it.. please help me i am very thankfull to you ....

    Thanks
     
    ajayto, Oct 30, 2009 IP
  2. pratapsingh

    pratapsingh Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to use CURL library of php. And with the help of regular expressions you can write the code for fetching the data from different sites.
     
    pratapsingh, Oct 30, 2009 IP
  3. MattyAsia

    MattyAsia Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not 100% sure about your question, if you're trying to get the info off other websites, and they don't require login.
    $html_source = file_get_contents('http://www.site.com/asd.txt');
    or
    $html_source = file_get_contents('http://www.site.com/product.html?id=' . $product_id);
    or
    $html_source = file_get_contents("http://www.site.com/product.html?id=$product_id");

    The last 2 do the same thing.
     
    MattyAsia, Oct 30, 2009 IP