PHP screen scrape for prices on XBOX products ( 5 Views )

no kitty!
  1. MY SCRIPT: Here is the PHP code I created for my more.php pages to dynamically scrape xbox product prices from GameStop.com:

    //<--start Paul's PHP Gamestop Scrape function-->//

    $symbol=''. $v[ProductName] .'';
    echo "COMPARE PRICES on $symbol <br /><br />";
    $varlength = strlen($symbol);

    $limit = 16;

    if ($varlength > $limit) {

    $symbol = substr($symbol,0,$limit) . "";}

    $theurl='http://www.gamestop.com/search.asp?sortby=price&searchtype=quicksearch&searchcount=12&keyword='.urlenc ode($symbol).'&platform=26';

    echo "Gamestop.com: ";

    if (!($fp = fopen($theurl, 'r')))
    {
    echo 'Could not open URL';
    exit;
    }
    $contents .= fread($fp, 1000000);

    fclose($fp);

    $pattern = "(\\$[0-9 ]+\\.[0-9]+)";
    if (eregi($pattern, $contents, $quote))
    {
    echo $quote[1];

    } else
    {
    echo 'No price available';
    };

    echo ''
    ." <a href=\"$theurl\"> more info</a> or <a href=\"$theurl\"> buy it now!</a><br /><br /><br />";

    //<--end Paul's PHP Gamestop Scrape function-->//

    MY PROBLEM: when the above scipt is executed, the incorrect data is displayed in my more.php pages....it returns $10.00 for everything...not sure why this is or if my script was even written correctly.

    EXAMPLE OF PROBLEM: http://www.xboxstore.com/more.php?i...1G&cat=3&pcat=0 Scroll down the page till you get right above the ebay auctions. Look for the words "COMPARE PRICES on HALO Gamestop.com: $10.00 more info or buy it now!" in small white letters. Notice that if you click "buy it now" it takes you to the correct page on GameSpot but fails to scrape the correct pricing.

    WHAT I AM TRYING TO DO: I would like my script to scrape the small image,the title of the product,the new or pre-owned price, and the corresponding buy link to purchase the product..for the first full page of product results. In this case, the first 9 matches for the XBOX game "Halo" desending from LOWEST PRICE to HIGHEST PRICE.

    ANY HELP WOULD BE GREATLY APPRECIATED AS IT HAS COST ME MANY FRUSTRATING HOURS OF NON PRODUCTIVE WORK..TRYING TO FIGURE IT ALL OUT. THANK YOU AND GODBLESS, paulie FROM NEW YORK CITY (xboxstore.com) email: paul@xboxstore.com aim:nylastyles

    (serhat, Saint Vincent and the Grenadines)

  2. Please don't post your question in more than one forum. I'm going to get an Advisor to delete this thread.

    (HİLAL, French Guiana)

  3. Is this even a) advanced PHP or b) legal/ethical?

    (kamil, Estonia)

  4. This is not an advanced topic of discussion. I wish people would learn to use this forums properly, as it only bloats the real topics to discuss :mad:

    (fethi, Philippines)

  5. Quote:

    Originally Posted by xboxstore.com
    ANY HELP WOULD BE GREATLY APPRECIATED AS IT HAS COST ME MANY FRUSTRATING HOURS OF NON PRODUCTIVE WORK..TRYING TO FIGURE IT ALL OUT.

    Here's a pointer: If you've spent hours trying to find out what's wrong and you still have no idea where in the script the problem is, then you first need to learn how to debug a script. And if you have any questions about that, this is not the forum to ask.

    (mehmet, Georgia)

  6. Way to go Dagfinn ;)

    (fatih, San Marino)



Related Topics ... (or search in 1.720.883 topics !)

sugestions on simple php screen scrape (5)
screen scrape questions (5)
screen scrape question (3)
would like to screen scrape this site, difficult to do? (12)
simple screen scrape needed (3)
adobe products for very low prices... (10)
how to change products.php?g=2093 to products?g=2093 (22)
xbox games prices(used) (5)
are these xbox 360 game prices insane or what? (5)




copyright © 2007-2031 Pfodere.COM ( 5 Pfoyihuee Online )

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
1.2932