Mercurial > hg > ywww
annotate xml/getAmazonInfo.php @ 7:1dfe64e365a0
a bit more debugging/bomb-proofing
author | Robert Boland <robert@markup.co.uk> |
---|---|
date | Fri, 17 Feb 2017 13:40:20 +0000 |
parents | 55445b456ad0 |
children | 232deb0b066a |
rev | line source |
---|---|
4 | 1 <?php |
2 | |
5 | 3 $lastReqTime=0; |
4 | 4 function getAmazonDet($isbn,$go,$localeIn) |
5 { | |
6 global $output; | |
7 $Adefault=array( | |
8 'language' =>'en', //what language to render the page in | |
9 'locale' =>$localeIn, //which server's products? available: ca,de,fr,jp,uk,us | |
10 //'mode' =>'books', //what product category? | |
11 'page' =>1, //first page to show (we are counting from 1 not 0) | |
12 //'search' =>'Machiavelli', //what to search for? | |
13 'operation' =>'ItemLookup', //what to do? //ItemSearch | |
14 // 'searchindex' =>'Books', //what product category for search? | |
15 'searchparameter' =>'ItemId', //what kind of search? | |
16 'searchparameterdata'=>$isbn, //what to search for? | |
17 //here some debugging flags you can put at the end of the URL to call this script with, like: '?show_array=true' | |
18 'show_array' =>false, //debug: show complete incoming array? You can use this to see what other information Amazon is sending | |
19 'show_url' =>false, //debug: show XML request url to be send to Amazon? | |
20 'show_xml' =>false, //debug: show incoming XML code from Amazon? | |
21 ); | |
22 //change the debug options to true if you want to activate them or call the script with '?show_array=true' to see what actual information you're getting from Amazon and how little my standard script is actually showing of it | |
23 | |
24 $Aassociates_id=array( | |
25 'uk' => 'bookwhack-21', | |
26 'us' => 'your02b-20', | |
27 'ca' => 'book009-20', | |
28 'de' => 'book04c-21', | |
29 'fr' => 'book07f-21', | |
30 ); | |
31 | |
32 $Aserver=array( | |
33 'ca' => array( | |
34 'ext' => 'ca' , //Canadian normal server | |
35 'nor' => 'http://www.amazon.ca' , //Canadian normal server | |
36 'xml' => 'http://xml.amazon.com' , //Canadian xml server | |
37 ), | |
38 'de' => array( | |
39 'ext' => 'de' , //German normal server | |
40 'nor' => 'http://www.amazon.de' , //German normal server | |
41 'xml' => 'http://xml-eu.amazon.com', //German xml server | |
42 ), | |
43 'fr' => array( | |
44 'ext' => 'fr' , //French normal server | |
45 'nor' => 'http://www.amazon.fr' , //French normal server | |
46 'xml' => 'http://xml-eu.amazon.com', //French xml server | |
47 ), | |
48 'jp' => array( | |
49 'ext' => 'jp' , //Japanese normal server, not co.jp! | |
50 'nor' => 'http://www.amazon.co.jp' , //Japanese normal server | |
51 'xml' => 'http://xml.amazon.com' , //Japanese xml server | |
52 ), | |
53 'uk' => array( | |
54 'ext' => 'co.uk' , //UK normal server | |
55 'nor' => 'http://www.amazon.co.uk' , //UK normal server | |
56 'xml' => 'http://xml-eu.amazon.com', //UK xml server | |
57 ), | |
58 'us' => array( | |
59 'ext' => 'com' , //USA normal server | |
60 'nor' => 'http://www.amazon.com' , //USA normal server | |
61 'xml' => 'http://xml.amazon.com' , //USA xml server | |
62 ), | |
63 ); | |
64 | |
65 //if(go != 1) | |
66 //include "aws_signed_request.php"; | |
67 | |
68 $public_key ="AKIAJBXEHTNCU6LLFNIA"; | |
69 $private_key="Dgyv7aR6uGe3OtY95Dj6hHpDS/UEtyboMWpJchYA"; | |
70 | |
71 //for all parameters see if the user has overruled it or use the default | |
72 foreach ($Adefault as $i=>$d) { | |
73 $$i=isset($_GET[$i])?$_GET[$i]:$d; | |
74 } | |
75 //this is the data that is used to form the request for AWS | |
76 //this is the part that is search specific | |
77 $parameters=array( | |
78 'Operation' =>$operation , | |
79 //'Keywords' =>urlencode($search) , | |
80 //'SearchIndex' =>$searchindex , //Books for example. | |
81 "$searchparameter"=>$searchparameterdata , | |
82 'ItemPage' =>$page , //which page? | |
83 'AssociateTag' =>$Aassociates_id[$locale], | |
84 'ResponseGroup' =>'ItemAttributes,Reviews,EditorialReview,OfferSummary,Offers,Images,AlternateVersions,SalesRank,BrowseNodes' , //Small, Medium, Large or SellerListing,'BrowseNodes',// , | |
85 'ReviewSort' =>'-HelpfulVotes' | |
86 ); | |
87 | |
88 $ext=$Aserver[$locale]['ext']; | |
89 $file_data=$ext; | |
90 ksort($parameters); | |
91 foreach ($parameters as $i=>$d) { | |
92 $file_data.='&'.$i.'='.$d; | |
93 } | |
94 | |
95 $url=aws_signed_request($ext,$parameters,$public_key,$private_key); | |
96 //echo $url; | |
5 | 97 file_put_contents('/var/ywww/debug/phpDebug',"parms: $go". |
4 | 98 print_r($parameters,TRUE)."\n",FILE_APPEND); |
99 $crl = curl_init(); | |
100 $timeout = 5; | |
101 curl_setopt ($crl, CURLOPT_URL,$url); | |
102 curl_setopt ($crl, CURLOPT_ENCODING , "gzip"); | |
103 curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); | |
104 curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); | |
5 | 105 /* $timeDiff=((int)(microtime(true)*1000))-$lastReqTime; |
106 if ($timeDiff<1000) { | |
107 usleep((1000-$timeDiff)*1000); // microseconds | |
108 }*/ | |
4 | 109 $output = curl_exec($crl); |
5 | 110 //$lastReqTime=(int)(microtime(true)*1000); // milliseconds |
4 | 111 curl_close($crl); |
112 | |
113 /*$xml = new SimpleXMLElement("<?xml version=\"1.0\"?><ItemLookupErrorResponse xmlns=\"http://ecs.amazonaws.com/doc/2009-03-31/\"><Error><Code>AccountLimitExceeded</Code><Message>Account limit of 2056 requests per hour exceeded.</Message></Error><RequestID>290ed059-730c-4789-93b4-6d21e11053d3</RequestID></ItemLookupErrorResponse>");*/ | |
114 $review = ""; | |
5 | 115 // HST added this |
116 if (preg_match("<Error>",$output)) { | |
117 $xml = new SimpleXMLElement($output); | |
118 $resName=$xml->getName(); | |
119 $code=$xml->Error->Code; | |
120 file_put_contents('/var/ywww/debug/phpDebug',"Losing: $resName, ". | |
7
1dfe64e365a0
a bit more debugging/bomb-proofing
Robert Boland <robert@markup.co.uk>
parents:
5
diff
changeset
|
121 $code."\n",FILE_APPEND); |
1dfe64e365a0
a bit more debugging/bomb-proofing
Robert Boland <robert@markup.co.uk>
parents:
5
diff
changeset
|
122 if ($code=='RequestThrottled') { |
1dfe64e365a0
a bit more debugging/bomb-proofing
Robert Boland <robert@markup.co.uk>
parents:
5
diff
changeset
|
123 usleep(200000); // Try to reduce throttling until we get a |
1dfe64e365a0
a bit more debugging/bomb-proofing
Robert Boland <robert@markup.co.uk>
parents:
5
diff
changeset
|
124 // principled solution in place |
1dfe64e365a0
a bit more debugging/bomb-proofing
Robert Boland <robert@markup.co.uk>
parents:
5
diff
changeset
|
125 } |
5 | 126 } |
127 else { | |
128 $xml = new SimpleXMLElement($output); | |
129 set_error_handler(function () { | |
130 global $output; | |
131 file_put_contents('/var/ywww/debug/phpDebug', | |
132 "Caught one?: ".$searchparameterdata, | |
133 FILE_APPEND); | |
134 file_put_contents('/var/ywww/debug/phpDebug', | |
135 print_r($output, TRUE)."\n", | |
136 FILE_APPEND); | |
4 | 137 } ); |
5 | 138 $review = $xml->Items->Item->CustomerReviews->IFrameURL; |
139 // The above is failing repeatedly -- | |
140 //PHP Notice: Trying to get property of non-object in | |
141 // /var/ywww/xml/getAmazonInfo.php on line [109] | |
142 // See the dumped structure at the end of this file for the | |
143 // cause | |
144 restore_error_handler(); | |
145 //echo $review; | |
146 $review1 = ""; | |
147 $review2 = ""; | |
148 $review3 = ""; | |
149 } | |
4 | 150 if ($review != "") |
151 { | |
152 $text = @file_get_contents($review . "&truncate=300"); | |
153 $removeTop1 = preg_replace('~<div class="crIFrameHeaderLeftColumn">(.*?)<div class="crIFrameHeaderHistogram">~si', '', $text); | |
154 $removeTop2 = preg_replace('~<div class="crIFrameHeaderHistogram">(.*?)<div class="crIframeReviewList">~si', '', $text); | |
155 if (preg_match('~<body[^>]*>(.*?)</body>~si', $removeTop2, $body)){ $getBody = trim($body[1]); } | |
156 $removeDiv = preg_replace('~<div[^>]*>(.*?)</div>~si', '', $getBody); | |
157 $removeCloseDivs = preg_replace('/<\/div>/','', $removeDiv); | |
158 $setBoundary = str_replace('<!-- BOUNDARY -->','BOTTOM-TOP', $removeCloseDivs); | |
159 //replace <!-- BOUNDARY --> with BOTTOM-TOP | |
160 $remove1 = '~<table cellpadding="0"(.*?)%">~s'; | |
161 $setBoundary = preg_replace($remove1,'', $setBoundary); | |
162 $remove2 = '~</td><td bg(.*?)</table>~s'; | |
163 $setBoundary = preg_replace($remove2,'', $setBoundary); | |
164 $remove3 = '~<a name=(.*?)</a>~s'; | |
165 $setBoundary = preg_replace($remove3,'', $setBoundary); | |
166 $setBoundary2 = str_replace('<br />','', $setBoundary); | |
167 //remove all extra crap; | |
168 $setBoundary3 = str_replace('</td>','BOTTOM', $setBoundary2); | |
169 //replace </td> with BOTTOM | |
170 | |
171 if (preg_match_all('~TOP(.*?)BOTTOM~s', $setBoundary3, $reviews)) | |
172 { | |
173 $reviewContents = $reviews[1]; | |
174 //print_r($reviewContents); | |
175 $review1 = trim($reviewContents[0]); | |
176 $review1 = str_replace("\n", "", $review1); | |
177 $review1 = str_replace("\r", "", $review1); | |
178 if (isset($reviewContents[1])) { | |
179 $review2 = trim($reviewContents[1]); | |
180 $review2 = str_replace("\n", "", $review2); | |
181 $review2 = str_replace("\r", "", $review2); | |
182 } | |
183 else { | |
184 $review2 = ""; | |
185 } | |
186 if (isset($reviewContents[2])) { | |
187 $review3 = trim($reviewContents[2]); | |
188 $review3 = str_replace("\n", "", $review3); | |
189 $review3 = str_replace("\r", "", $review3); | |
190 } | |
191 else { | |
192 $review3 = ""; | |
193 } | |
194 } | |
195 else | |
196 { | |
197 $review1 = ""; | |
198 $review2 = ""; | |
199 $review3 = ""; | |
200 //echo "EPIC FAIL"; | |
201 } | |
202 | |
203 unset($xml->Items->Item->CustomerReviews); | |
204 $xdoc = new DomDocument; | |
205 $xdoc->loadXML($xml->asXML()); | |
206 | |
207 $cReviews = $xdoc ->createElement('CustomerReviews'); | |
208 $cReviewHolder = $xdoc ->createElement('Review'); | |
209 $cReview = $xdoc ->createElement('Content'); | |
210 $cReviewHolder2 = $xdoc ->createElement('Review'); | |
211 $cReview2 = $xdoc ->createElement('Content'); | |
212 $cReviewHolder3 = $xdoc ->createElement('Review'); | |
213 $cReview3 = $xdoc ->createElement('Content'); | |
214 | |
215 $txtNode = $xdoc ->createTextNode ($review1); | |
216 $cReview -> appendChild($txtNode); | |
217 | |
218 $txtNode2 = $xdoc ->createTextNode ($review2); | |
219 $cReview2 -> appendChild($txtNode2); | |
220 | |
221 $txtNode3 = $xdoc ->createTextNode ($review3); | |
222 $cReview3 -> appendChild($txtNode3); | |
223 | |
224 $cReviewHolder -> appendChild($cReview); | |
225 $cReviewHolder2 -> appendChild($cReview2); | |
226 $cReviewHolder3 -> appendChild($cReview3); | |
227 | |
228 $cReviews -> appendChild($cReviewHolder); | |
229 $cReviews -> appendChild($cReviewHolder2); | |
230 $cReviews -> appendChild($cReviewHolder3); | |
231 | |
232 $xdoc->documentElement->childNodes->item(1)->childNodes->item(1)->appendChild($cReviews); | |
233 $newXML = simplexml_import_dom($xdoc); | |
234 $output = $newXML->asXml(); | |
235 } | |
236 | |
237 switch($locale){ | |
238 case "us": | |
239 $loc = 0; | |
240 break; | |
241 case "uk": | |
242 $loc = 1; | |
243 break; | |
244 case "ca": | |
245 $loc = 2; | |
246 break; | |
247 case "de": | |
248 $loc = 3; | |
249 break; | |
250 case "fr": | |
251 $loc = 4; | |
252 break; | |
253 }; | |
254 | |
255 $errorCode = $xml->Error->Code; | |
256 //echo $errorCode; | |
257 | |
258 if($errorCode != "AccountLimitExceeded") | |
259 { | |
5 | 260 if($go == 1) { |
261 file_put_contents('/var/ywww/debug/phpDebug',"win: ". | |
262 $xml->Items->Item->ItemAttributes->Title."\n", | |
263 FILE_APPEND); | |
4 | 264 return $output; |
5 | 265 } |
4 | 266 else |
267 { | |
268 $title = $xml->Items->Item->ItemAttributes->Title; | |
269 $author = $xml->Items->Item->ItemAttributes->Author; | |
270 $binding = $xml->Items->Item->ItemAttributes->Binding; | |
271 $dewey = $xml->Items->Item->ItemAttributes->DeweyDecimalNumber; | |
272 if($dewey == "") | |
273 $dewey = "null"; | |
274 $imageURL = $xml->Items->Item->MediumImage->URL; | |
275 $salesRank = $xml->Items->Item->SalesRank; | |
276 $pubDate = $xml->Items->Item->ItemAttributes->PublicationDate; | |
277 $publisher = $xml->Items->Item->ItemAttributes->Publisher; | |
278 | |
279 $genreID = ""; | |
280 $genre = ""; | |
281 $genArr = array(); | |
282 | |
283 for($i=0;$i<sizeof($xml->Items->Item->BrowseNodes->BrowseNode);$i++){ | |
284 //sexy recursive function | |
285 findGenre($xml->Items->Item->BrowseNodes->BrowseNode[$i], $genreID, $genre); | |
286 | |
287 if($genre != "") | |
288 $genArr[strval($genreID)] = strval($genre); | |
289 //$genArr[$i] = array(strval($genreID) => strval($genre)); | |
290 | |
291 //echo $genre; | |
292 //echo $genreID; | |
293 | |
294 $genre = ""; | |
295 $genreID = ""; | |
296 } | |
297 | |
298 $g1 = "null"; | |
299 $g2 = "null"; | |
300 $g3 = "null"; | |
301 $loop = 1; | |
302 | |
303 foreach ($genArr as $key => $value) { | |
304 //echo "$key => $value"; | |
305 $queryG = "CALL b_addBrowseNode($key,\"$value\")"; //add the name value pair for genre to new table | |
306 //echo $queryG; | |
307 include "../../private/db.php"; | |
308 $resG = mysqli_query($link, $queryG); | |
309 mysqli_close($link); | |
310 | |
311 switch ($loop) { | |
312 case 1: | |
313 $g1 = $key; | |
314 break; | |
315 case 2: | |
316 $g2 = $key; | |
317 break; | |
318 case 3: | |
319 $g3 = $key; | |
320 break; | |
321 } | |
322 | |
323 $loop++; | |
324 } | |
325 | |
326 if($salesRank == "") | |
327 $salesRank = "null"; | |
328 | |
329 $title = strtr($title, '"', "'"); | |
330 include "../../private/db.php"; | |
331 $review1 = mysqli_real_escape_string($link,$review1); | |
332 $review2 = mysqli_real_escape_string($link,$review2); | |
333 $review3 = mysqli_real_escape_string($link,$review3); | |
334 | |
335 if($title != "") | |
336 { | |
337 $queryInsert = "CALL b_addNewBook(\"$searchparameterdata\",\"$title\", \"$author\",\"$binding\",\"$imageURL\", $dewey, $salesRank,\"$pubDate\",\"$publisher\",$g1,$g2,$g3,$loc)"; | |
338 //echo $queryInsert; | |
339 $queryInsertReviews = "CALL b_insertReviews(\"$searchparameterdata\",\"$review1\",\"$review2\",\"$review3\")"; | |
340 | |
341 $resG = mysqli_query($link, $queryInsert) or exit( mysqli_error( $link )); | |
342 if($review1 != "" && $review2 != "" && $review3 != "") | |
343 $resG = mysqli_query($link, $queryInsertReviews) or exit( mysqli_error( $link )); | |
344 | |
345 mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop | |
346 } | |
347 | |
348 echo $output; | |
349 } | |
350 } | |
351 else | |
352 { | |
353 //look up info from db | |
354 include "../../private/db.php"; | |
355 $query = "CALL b_getBookInfo('$searchparameterdata', $loc)"; | |
356 //echo $query; | |
357 $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); | |
358 | |
359 $output = ""; | |
360 $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | |
361 $output .= "<Details>"; | |
362 if ( mysqli_num_rows( $res ) > 0 ) | |
363 { | |
364 $rows=mysqli_fetch_array($res, MYSQLI_ASSOC); | |
365 | |
366 $output .= "<ASIN>" . $searchparameterdata . "</ASIN>"; | |
367 $output .= "<Title>" . htmlspecialchars($rows["Title"]) . "</Title>"; | |
368 $output .= "<Author>" . htmlspecialchars($rows["Author"]) . "</Author>"; | |
369 $output .= "<Binding>" . htmlspecialchars($rows["Binding"]) . "</Binding>"; | |
370 $output .= "<Dewey>" . htmlspecialchars($rows["DeweyDecimal"]) . "</Dewey>"; | |
371 $output .= "<ImageURL>" . htmlspecialchars($rows["ImageURL"]) . "</ImageURL>"; | |
372 $output .= "<SalesRank>" . htmlspecialchars($rows["SalesRank"]) . "</SalesRank>"; | |
373 $output .= "<PublicationDate>" . htmlspecialchars($rows["PublicationDate"]) . "</PublicationDate>"; | |
374 $output .= "<Publisher>" . htmlspecialchars($rows["Publisher"]) . "</Publisher>"; | |
375 $output .= "<Genre1>" . htmlspecialchars($rows["Genre1"]) . "</Genre1>"; | |
376 $output .= "<Genre2>" . htmlspecialchars($rows["Genre2"]) . "</Genre2>"; | |
377 $output .= "<Genre3>" . htmlspecialchars($rows["Genre3"]) . "</Genre3>"; | |
378 $output .= "<ProductGroup>Book</ProductGroup>"; | |
379 $output .= "<Error>AccountLimitExceeded</Error>"; | |
380 | |
381 } | |
382 $output .= "</Details>"; | |
383 echo $output; | |
384 } | |
385 } | |
386 | |
387 function findGenre($browseNode, &$ID, &$gen) | |
388 { | |
389 if($browseNode->Name == "Subjects") | |
390 { | |
391 return true; | |
392 } | |
393 else | |
394 { | |
395 if($browseNode->Ancestors->BrowseNode) | |
396 { | |
397 if(findGenre($browseNode->Ancestors->BrowseNode, $ID, $gen) == true) | |
398 { | |
399 $gen = $browseNode->Name; | |
400 $ID = $browseNode->BrowseNodeId; | |
401 } | |
402 } | |
403 return false; | |
404 } | |
405 } | |
406 | |
407 if(!isset($ret)) | |
408 { | |
409 include "aws_signed_request.php"; | |
410 getAmazonDet('default',0,'us'); //will get overwritten | |
411 } | |
412 /*Caught oneSimpleXMLElement Object | |
413 ( | |
414 [OperationRequest] => SimpleXMLElement Object | |
415 ( | |
416 [RequestId] => d2eaacba-2411-44e7-b268-f23a20167330 | |
417 [Arguments] => SimpleXMLElement Object | |
418 ( | |
419 [Argument] => Array | |
420 ( | |
421 [0] => SimpleXMLElement Object | |
422 ( | |
423 [@attributes] => Array | |
424 ( | |
425 [Name] => AWSAccessKeyId | |
426 [Value] => AKIAJBXEHTNCU6LLFNIA | |
427 ) | |
428 | |
429 ) | |
430 | |
431 [1] => SimpleXMLElement Object | |
432 ( | |
433 [@attributes] => Array | |
434 ( | |
435 [Name] => AssociateTag | |
436 [Value] => bookwhack-21 | |
437 ) | |
438 | |
439 ) | |
440 | |
441 [2] => SimpleXMLElement Object | |
442 ( | |
443 [@attributes] => Array | |
444 ( | |
445 [Name] => ItemId | |
446 [Value] => B004Q3Q3Y4 | |
447 ) | |
448 | |
449 ) | |
450 | |
451 [3] => SimpleXMLElement Object | |
452 ( | |
453 [@attributes] => Array | |
454 ( | |
455 [Name] => ItemPage | |
456 [Value] => 1 | |
457 ) | |
458 | |
459 ) | |
460 | |
461 [4] => SimpleXMLElement Object | |
462 ( | |
463 [@attributes] => Array | |
464 ( | |
465 [Name] => Operation | |
466 [Value] => ItemLookup | |
467 ) | |
468 | |
469 ) | |
470 | |
471 [5] => SimpleXMLElement Object | |
472 ( | |
473 [@attributes] => Array | |
474 ( | |
475 [Name] => ResponseGroup | |
476 [Value] => ItemAttributes,Reviews,EditorialReview,OfferSummary,Offers,Images,AlternateVersions,SalesRank,BrowseNodes | |
477 ) | |
478 | |
479 ) | |
480 | |
481 [6] => SimpleXMLElement Object | |
482 ( | |
483 [@attributes] => Array | |
484 ( | |
485 [Name] => ReviewSort | |
486 [Value] => -HelpfulVotes | |
487 ) | |
488 | |
489 ) | |
490 | |
491 [7] => SimpleXMLElement Object | |
492 ( | |
493 [@attributes] => Array | |
494 ( | |
495 [Name] => Service | |
496 [Value] => AWSECommerceService | |
497 ) | |
498 | |
499 ) | |
500 | |
501 [8] => SimpleXMLElement Object | |
502 ( | |
503 [@attributes] => Array | |
504 ( | |
505 [Name] => Timestamp | |
506 [Value] => 2016-12-15T23:12:34Z | |
507 ) | |
508 | |
509 ) | |
510 | |
511 [9] => SimpleXMLElement Object | |
512 ( | |
513 [@attributes] => Array | |
514 ( | |
515 [Name] => Version | |
516 [Value] => 2011-08-01 | |
517 ) | |
518 | |
519 ) | |
520 | |
521 [10] => SimpleXMLElement Object | |
522 ( | |
523 [@attributes] => Array | |
524 ( | |
525 [Name] => Signature | |
526 [Value] => SUXfFZHQ74Joc+WDLx87uzemTdtHijNohykqafJXYKQ= | |
527 ) | |
528 | |
529 ) | |
530 | |
531 ) | |
532 | |
533 ) | |
534 | |
535 [RequestProcessingTime] => 0.3518217620000000 | |
536 ) | |
537 | |
538 [Items] => SimpleXMLElement Object | |
539 ( | |
540 [Request] => SimpleXMLElement Object | |
541 ( | |
542 [IsValid] => True | |
543 [ItemLookupRequest] => SimpleXMLElement Object | |
544 ( | |
545 [IdType] => ASIN | |
546 [ItemId] => B004Q3Q3Y4 | |
547 [ResponseGroup] => Array | |
548 ( | |
549 [0] => ItemAttributes | |
550 [1] => Reviews | |
551 [2] => EditorialReview | |
552 [3] => OfferSummary | |
553 [4] => Offers | |
554 [5] => Images | |
555 [6] => AlternateVersions | |
556 [7] => SalesRank | |
557 [8] => BrowseNodes | |
558 ) | |
559 | |
560 [VariationPage] => All | |
561 ) | |
562 | |
563 [Errors] => SimpleXMLElement Object | |
564 ( | |
565 [Error] => SimpleXMLElement Object | |
566 ( | |
567 [Code] => AWS.InvalidParameterValue | |
568 [Message] => B004Q3Q3Y4 is not a valid value for ItemId. Please change this value and retry your request. | |
569 ) | |
570 | |
571 ) | |
572 | |
573 ) | |
574 | |
575 ) | |
576 | |
577 ) | |
578 */ | |
579 ?> |