Dear Sir I am a php developer and i am facing some problem regarding web scaraping.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mukesh9023
    New Member
    • Nov 2013
    • 11

    Dear Sir I am a php developer and i am facing some problem regarding web scaraping.

    Code:
    <?php 
    $file_string = file_get_contents('http://delhi.tradus.com/puma-axis-ii-ind-silver-lime-green-sports-shoes/p/FTWN4FH29KD29I2T?tag=19622&tsrc=TagListing');
    preg_match('#<span itemprop="priceCurrency" class="rupee">(.*)<\/span><span itemprop="(.*?)">(.*)<\/span>#', $file_string, $price);
    echo '<pre>';
    print_r($price);
    echo $price_out = $price[0];
    
    ?>
    //Note: This code i am using for fetching the price from tradus.com shopping website its work but it is picking wrong price from website. I had created lot of preg_match pattern but it fails so please provide me exact solution regarding this
    Last edited by Rabbit; May 9 '14, 03:37 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    The exact solution would be to contact the site owner, and ask him to send you the complete list of prices.....

    Comment

    • Mukesh9023
      New Member
      • Nov 2013
      • 11

      #3
      Dear Luuk
      Thank you for your response but i want to fetch price from using web scraping code. I had fetched price from above 30 websites but in tradus.com.it doesn't work.

      Comment

      Working...