Page 1 of 1
ISBN Lookup from Amazon.com
Posted: Thu Aug 04, 2005 6:03 am
by sonicworld
Can anybody get me a php code to do ISBN lookup from Amazon.com
Posted: Thu Aug 04, 2005 6:32 am
by anjanesh
Code: Select all
$isbn = "0439784549";
$url = "http://www.amazon.com/exec/obidos/tg/detail/-/$isbn";
$contents = file_get_contents($url);
echo $contents;
Posted: Thu Aug 04, 2005 7:07 am
by timvw
Btw, you might want to take care of sending some extra headers like User-Agent as i seem to remember that amazon.com uses this to determine what is send back..
Posted: Thu Aug 04, 2005 7:36 am
by feyd
...which means you should probably use
cURL
Thanks
Posted: Thu Aug 04, 2005 12:18 pm
by sonicworld
Thanks for your reply..
But i would like to retrieve the data from amazon using there webservice.. i want to display the details in my own customized page. can u tell me how to do that? are there any free scripts? or sample scripts?
TIA
Posted: Thu Aug 04, 2005 12:31 pm
by anjanesh
thanks
Posted: Thu Aug 04, 2005 12:41 pm
by sonicworld
But they dont give any sample php scripts..
can anybody get me some sample php scripts?
TIA
Posted: Thu Aug 04, 2005 8:55 pm
by timvw
Yes, you can. I typed "php amazon webservice" and was returned quite a few classes that can be used.. Or if you feel like doing it over, you can use them as an example..
Thanks
Posted: Fri Aug 05, 2005 10:56 am
by sonicworld
Thanks it really helped..