Click to See Complete Forum and Search --> : Screen Scrapping Information


ojsimon
06-30-2007, 01:50 PM
i would like to be able to get amazons price for a product so what ive worked out is that a user types in a product and the script returns a price by converting the users input to a string and adding it to the amazon search url

http://www.amazon.co.uk/s/ref=nb_ss_w_h_/026-7249447-2512412?url=search-alias%3Daps&field-keywords=

String

&Go.x=0&Go.y=0&Go=Go

However i cannot work out how to get the script to get the price from here and saving that as a string.

Thanks

MrCoder
06-30-2007, 03:21 PM
Am I missing something, this is the 2nd post about this I have seen today lol.

ojsimon
07-01-2007, 04:17 AM
They are both from me except one is screenscrapping information the other is screenscrapping images, sorry if this is a problem thanks

bluestars
07-01-2007, 08:29 PM
Pull the page down in PHP:

$url = "http://www.amazon.co.uk/s/ref=nb_ss_...ield-keywords=" . $string;
$page = file_get_contents($url);

Then use a regexp to find the price in the source code.

ojsimon
07-02-2007, 10:58 AM
how would you use regular expressions to do this because there are many prices on the page i want the first 1
thanks