I am trying to figure out the Amazon API and I am getting the following error...
file_get_contents(http://ecs.amazonaws.com/onca/xml?Servi ... ssKeyId=ID Goes here=2010-10-01&Operation=ItemSearch&SearchIndex=Books&Keywords=Harry Potter): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/www/AmazonTest/SimpleStore.php on line 29
I was researching the error and it said that I should turn this on and I did: allow_url_fopen On in the PHP.ini file When I do a phpinfo() it shows "on" now.
This is where I am getting the error:
Code: Select all
$request=
"http://ecs.amazonaws.com/onca/xml"
. "?Service=AWSECommerceService"
. "&AssociateTag=" . Associate_tag
. "&AWSAccessKeyId=" . Access_Key_ID
. "&Version=" . $Version
. "&Operation=" . $Operation
. "&SearchIndex=" . $SearchIndex
. "&Keywords=" . $Keywords
. "&ResponseGroup=" . $ResponseGroup;
// echo "Request output: " .$request;
//Catch the response in the $response object
$response = file_get_contents($request);What else can be causing this???
Thanks