Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
all i need is to perform ItemLookup for a book and display its details. the rpoblem is, i don't know how to send the request and handle the response from Amazon WS.
i tried:Code: Select all
$url = 'http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=[ ..........]&Operation=ItemLookup&IdType=ASIN&ItemId=0130319996&ResponseGroup=Medium,OfferFull';
$xml = file_get_contents($url);and get an error right away:
Code: Select all
Warning: file_get_contents(http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=[ .............]&Operation=ItemLookup&IdType=ASIN&ItemId=0130319996&ResponseGroup=Medium,OfferFull) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Server Error in c:\htdocs\phpflash\untitled-6.php on line 4simplexml_load_file() works if i open an actual file but wouldn't handle the Amazon response.
Code: Select all
Warning: xml_parser_create() [function.xml-parser-create]: unsupported source encoding "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=[ ...]&Operation=ItemLookup&IdType=ASIN&ItemId=0130319996&ResponseGroup=Medium,OfferFull" in c:\htdocs\phpflash\untitled-6.php on line 6is there a way to figure out if Amazon's response is OK? i use the standard request Amazon suggests on their site.
thanks.
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]