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, ".
|
|
121 $xml->Error->Code."\n",FILE_APPEND);
|
|
122 }
|
|
123 else {
|
|
124 $xml = new SimpleXMLElement($output);
|
|
125 set_error_handler(function () {
|
|
126 global $output;
|
|
127 file_put_contents('/var/ywww/debug/phpDebug',
|
|
128 "Caught one?: ".$searchparameterdata,
|
|
129 FILE_APPEND);
|
|
130 file_put_contents('/var/ywww/debug/phpDebug',
|
|
131 print_r($output, TRUE)."\n",
|
|
132 FILE_APPEND);
|
4
|
133 } );
|
5
|
134 $review = $xml->Items->Item->CustomerReviews->IFrameURL;
|
|
135 // The above is failing repeatedly --
|
|
136 //PHP Notice: Trying to get property of non-object in
|
|
137 // /var/ywww/xml/getAmazonInfo.php on line [109]
|
|
138 // See the dumped structure at the end of this file for the
|
|
139 // cause
|
|
140 restore_error_handler();
|
|
141 //echo $review;
|
|
142 $review1 = "";
|
|
143 $review2 = "";
|
|
144 $review3 = "";
|
|
145 }
|
4
|
146 if ($review != "")
|
|
147 {
|
|
148 $text = @file_get_contents($review . "&truncate=300");
|
|
149 $removeTop1 = preg_replace('~<div class="crIFrameHeaderLeftColumn">(.*?)<div class="crIFrameHeaderHistogram">~si', '', $text);
|
|
150 $removeTop2 = preg_replace('~<div class="crIFrameHeaderHistogram">(.*?)<div class="crIframeReviewList">~si', '', $text);
|
|
151 if (preg_match('~<body[^>]*>(.*?)</body>~si', $removeTop2, $body)){ $getBody = trim($body[1]); }
|
|
152 $removeDiv = preg_replace('~<div[^>]*>(.*?)</div>~si', '', $getBody);
|
|
153 $removeCloseDivs = preg_replace('/<\/div>/','', $removeDiv);
|
|
154 $setBoundary = str_replace('<!-- BOUNDARY -->','BOTTOM-TOP', $removeCloseDivs);
|
|
155 //replace <!-- BOUNDARY --> with BOTTOM-TOP
|
|
156 $remove1 = '~<table cellpadding="0"(.*?)%">~s';
|
|
157 $setBoundary = preg_replace($remove1,'', $setBoundary);
|
|
158 $remove2 = '~</td><td bg(.*?)</table>~s';
|
|
159 $setBoundary = preg_replace($remove2,'', $setBoundary);
|
|
160 $remove3 = '~<a name=(.*?)</a>~s';
|
|
161 $setBoundary = preg_replace($remove3,'', $setBoundary);
|
|
162 $setBoundary2 = str_replace('<br />','', $setBoundary);
|
|
163 //remove all extra crap;
|
|
164 $setBoundary3 = str_replace('</td>','BOTTOM', $setBoundary2);
|
|
165 //replace </td> with BOTTOM
|
|
166
|
|
167 if (preg_match_all('~TOP(.*?)BOTTOM~s', $setBoundary3, $reviews))
|
|
168 {
|
|
169 $reviewContents = $reviews[1];
|
|
170 //print_r($reviewContents);
|
|
171 $review1 = trim($reviewContents[0]);
|
|
172 $review1 = str_replace("\n", "", $review1);
|
|
173 $review1 = str_replace("\r", "", $review1);
|
|
174 if (isset($reviewContents[1])) {
|
|
175 $review2 = trim($reviewContents[1]);
|
|
176 $review2 = str_replace("\n", "", $review2);
|
|
177 $review2 = str_replace("\r", "", $review2);
|
|
178 }
|
|
179 else {
|
|
180 $review2 = "";
|
|
181 }
|
|
182 if (isset($reviewContents[2])) {
|
|
183 $review3 = trim($reviewContents[2]);
|
|
184 $review3 = str_replace("\n", "", $review3);
|
|
185 $review3 = str_replace("\r", "", $review3);
|
|
186 }
|
|
187 else {
|
|
188 $review3 = "";
|
|
189 }
|
|
190 }
|
|
191 else
|
|
192 {
|
|
193 $review1 = "";
|
|
194 $review2 = "";
|
|
195 $review3 = "";
|
|
196 //echo "EPIC FAIL";
|
|
197 }
|
|
198
|
|
199 unset($xml->Items->Item->CustomerReviews);
|
|
200 $xdoc = new DomDocument;
|
|
201 $xdoc->loadXML($xml->asXML());
|
|
202
|
|
203 $cReviews = $xdoc ->createElement('CustomerReviews');
|
|
204 $cReviewHolder = $xdoc ->createElement('Review');
|
|
205 $cReview = $xdoc ->createElement('Content');
|
|
206 $cReviewHolder2 = $xdoc ->createElement('Review');
|
|
207 $cReview2 = $xdoc ->createElement('Content');
|
|
208 $cReviewHolder3 = $xdoc ->createElement('Review');
|
|
209 $cReview3 = $xdoc ->createElement('Content');
|
|
210
|
|
211 $txtNode = $xdoc ->createTextNode ($review1);
|
|
212 $cReview -> appendChild($txtNode);
|
|
213
|
|
214 $txtNode2 = $xdoc ->createTextNode ($review2);
|
|
215 $cReview2 -> appendChild($txtNode2);
|
|
216
|
|
217 $txtNode3 = $xdoc ->createTextNode ($review3);
|
|
218 $cReview3 -> appendChild($txtNode3);
|
|
219
|
|
220 $cReviewHolder -> appendChild($cReview);
|
|
221 $cReviewHolder2 -> appendChild($cReview2);
|
|
222 $cReviewHolder3 -> appendChild($cReview3);
|
|
223
|
|
224 $cReviews -> appendChild($cReviewHolder);
|
|
225 $cReviews -> appendChild($cReviewHolder2);
|
|
226 $cReviews -> appendChild($cReviewHolder3);
|
|
227
|
|
228 $xdoc->documentElement->childNodes->item(1)->childNodes->item(1)->appendChild($cReviews);
|
|
229 $newXML = simplexml_import_dom($xdoc);
|
|
230 $output = $newXML->asXml();
|
|
231 }
|
|
232
|
|
233 switch($locale){
|
|
234 case "us":
|
|
235 $loc = 0;
|
|
236 break;
|
|
237 case "uk":
|
|
238 $loc = 1;
|
|
239 break;
|
|
240 case "ca":
|
|
241 $loc = 2;
|
|
242 break;
|
|
243 case "de":
|
|
244 $loc = 3;
|
|
245 break;
|
|
246 case "fr":
|
|
247 $loc = 4;
|
|
248 break;
|
|
249 };
|
|
250
|
|
251 $errorCode = $xml->Error->Code;
|
|
252 //echo $errorCode;
|
|
253
|
|
254 if($errorCode != "AccountLimitExceeded")
|
|
255 {
|
5
|
256 if($go == 1) {
|
|
257 file_put_contents('/var/ywww/debug/phpDebug',"win: ".
|
|
258 $xml->Items->Item->ItemAttributes->Title."\n",
|
|
259 FILE_APPEND);
|
4
|
260 return $output;
|
5
|
261 }
|
4
|
262 else
|
|
263 {
|
|
264 $title = $xml->Items->Item->ItemAttributes->Title;
|
|
265 $author = $xml->Items->Item->ItemAttributes->Author;
|
|
266 $binding = $xml->Items->Item->ItemAttributes->Binding;
|
|
267 $dewey = $xml->Items->Item->ItemAttributes->DeweyDecimalNumber;
|
|
268 if($dewey == "")
|
|
269 $dewey = "null";
|
|
270 $imageURL = $xml->Items->Item->MediumImage->URL;
|
|
271 $salesRank = $xml->Items->Item->SalesRank;
|
|
272 $pubDate = $xml->Items->Item->ItemAttributes->PublicationDate;
|
|
273 $publisher = $xml->Items->Item->ItemAttributes->Publisher;
|
|
274
|
|
275 $genreID = "";
|
|
276 $genre = "";
|
|
277 $genArr = array();
|
|
278
|
|
279 for($i=0;$i<sizeof($xml->Items->Item->BrowseNodes->BrowseNode);$i++){
|
|
280 //sexy recursive function
|
|
281 findGenre($xml->Items->Item->BrowseNodes->BrowseNode[$i], $genreID, $genre);
|
|
282
|
|
283 if($genre != "")
|
|
284 $genArr[strval($genreID)] = strval($genre);
|
|
285 //$genArr[$i] = array(strval($genreID) => strval($genre));
|
|
286
|
|
287 //echo $genre;
|
|
288 //echo $genreID;
|
|
289
|
|
290 $genre = "";
|
|
291 $genreID = "";
|
|
292 }
|
|
293
|
|
294 $g1 = "null";
|
|
295 $g2 = "null";
|
|
296 $g3 = "null";
|
|
297 $loop = 1;
|
|
298
|
|
299 foreach ($genArr as $key => $value) {
|
|
300 //echo "$key => $value";
|
|
301 $queryG = "CALL b_addBrowseNode($key,\"$value\")"; //add the name value pair for genre to new table
|
|
302 //echo $queryG;
|
|
303 include "../../private/db.php";
|
|
304 $resG = mysqli_query($link, $queryG);
|
|
305 mysqli_close($link);
|
|
306
|
|
307 switch ($loop) {
|
|
308 case 1:
|
|
309 $g1 = $key;
|
|
310 break;
|
|
311 case 2:
|
|
312 $g2 = $key;
|
|
313 break;
|
|
314 case 3:
|
|
315 $g3 = $key;
|
|
316 break;
|
|
317 }
|
|
318
|
|
319 $loop++;
|
|
320 }
|
|
321
|
|
322 if($salesRank == "")
|
|
323 $salesRank = "null";
|
|
324
|
|
325 $title = strtr($title, '"', "'");
|
|
326 include "../../private/db.php";
|
|
327 $review1 = mysqli_real_escape_string($link,$review1);
|
|
328 $review2 = mysqli_real_escape_string($link,$review2);
|
|
329 $review3 = mysqli_real_escape_string($link,$review3);
|
|
330
|
|
331 if($title != "")
|
|
332 {
|
|
333 $queryInsert = "CALL b_addNewBook(\"$searchparameterdata\",\"$title\", \"$author\",\"$binding\",\"$imageURL\", $dewey, $salesRank,\"$pubDate\",\"$publisher\",$g1,$g2,$g3,$loc)";
|
|
334 //echo $queryInsert;
|
|
335 $queryInsertReviews = "CALL b_insertReviews(\"$searchparameterdata\",\"$review1\",\"$review2\",\"$review3\")";
|
|
336
|
|
337 $resG = mysqli_query($link, $queryInsert) or exit( mysqli_error( $link ));
|
|
338 if($review1 != "" && $review2 != "" && $review3 != "")
|
|
339 $resG = mysqli_query($link, $queryInsertReviews) or exit( mysqli_error( $link ));
|
|
340
|
|
341 mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
|
|
342 }
|
|
343
|
|
344 echo $output;
|
|
345 }
|
|
346 }
|
|
347 else
|
|
348 {
|
|
349 //look up info from db
|
|
350 include "../../private/db.php";
|
|
351 $query = "CALL b_getBookInfo('$searchparameterdata', $loc)";
|
|
352 //echo $query;
|
|
353 $res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
|
|
354
|
|
355 $output = "";
|
|
356 $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
|
|
357 $output .= "<Details>";
|
|
358 if ( mysqli_num_rows( $res ) > 0 )
|
|
359 {
|
|
360 $rows=mysqli_fetch_array($res, MYSQLI_ASSOC);
|
|
361
|
|
362 $output .= "<ASIN>" . $searchparameterdata . "</ASIN>";
|
|
363 $output .= "<Title>" . htmlspecialchars($rows["Title"]) . "</Title>";
|
|
364 $output .= "<Author>" . htmlspecialchars($rows["Author"]) . "</Author>";
|
|
365 $output .= "<Binding>" . htmlspecialchars($rows["Binding"]) . "</Binding>";
|
|
366 $output .= "<Dewey>" . htmlspecialchars($rows["DeweyDecimal"]) . "</Dewey>";
|
|
367 $output .= "<ImageURL>" . htmlspecialchars($rows["ImageURL"]) . "</ImageURL>";
|
|
368 $output .= "<SalesRank>" . htmlspecialchars($rows["SalesRank"]) . "</SalesRank>";
|
|
369 $output .= "<PublicationDate>" . htmlspecialchars($rows["PublicationDate"]) . "</PublicationDate>";
|
|
370 $output .= "<Publisher>" . htmlspecialchars($rows["Publisher"]) . "</Publisher>";
|
|
371 $output .= "<Genre1>" . htmlspecialchars($rows["Genre1"]) . "</Genre1>";
|
|
372 $output .= "<Genre2>" . htmlspecialchars($rows["Genre2"]) . "</Genre2>";
|
|
373 $output .= "<Genre3>" . htmlspecialchars($rows["Genre3"]) . "</Genre3>";
|
|
374 $output .= "<ProductGroup>Book</ProductGroup>";
|
|
375 $output .= "<Error>AccountLimitExceeded</Error>";
|
|
376
|
|
377 }
|
|
378 $output .= "</Details>";
|
|
379 echo $output;
|
|
380 }
|
|
381 }
|
|
382
|
|
383 function findGenre($browseNode, &$ID, &$gen)
|
|
384 {
|
|
385 if($browseNode->Name == "Subjects")
|
|
386 {
|
|
387 return true;
|
|
388 }
|
|
389 else
|
|
390 {
|
|
391 if($browseNode->Ancestors->BrowseNode)
|
|
392 {
|
|
393 if(findGenre($browseNode->Ancestors->BrowseNode, $ID, $gen) == true)
|
|
394 {
|
|
395 $gen = $browseNode->Name;
|
|
396 $ID = $browseNode->BrowseNodeId;
|
|
397 }
|
|
398 }
|
|
399 return false;
|
|
400 }
|
|
401 }
|
|
402
|
|
403 if(!isset($ret))
|
|
404 {
|
|
405 include "aws_signed_request.php";
|
|
406 getAmazonDet('default',0,'us'); //will get overwritten
|
|
407 }
|
|
408 /*Caught oneSimpleXMLElement Object
|
|
409 (
|
|
410 [OperationRequest] => SimpleXMLElement Object
|
|
411 (
|
|
412 [RequestId] => d2eaacba-2411-44e7-b268-f23a20167330
|
|
413 [Arguments] => SimpleXMLElement Object
|
|
414 (
|
|
415 [Argument] => Array
|
|
416 (
|
|
417 [0] => SimpleXMLElement Object
|
|
418 (
|
|
419 [@attributes] => Array
|
|
420 (
|
|
421 [Name] => AWSAccessKeyId
|
|
422 [Value] => AKIAJBXEHTNCU6LLFNIA
|
|
423 )
|
|
424
|
|
425 )
|
|
426
|
|
427 [1] => SimpleXMLElement Object
|
|
428 (
|
|
429 [@attributes] => Array
|
|
430 (
|
|
431 [Name] => AssociateTag
|
|
432 [Value] => bookwhack-21
|
|
433 )
|
|
434
|
|
435 )
|
|
436
|
|
437 [2] => SimpleXMLElement Object
|
|
438 (
|
|
439 [@attributes] => Array
|
|
440 (
|
|
441 [Name] => ItemId
|
|
442 [Value] => B004Q3Q3Y4
|
|
443 )
|
|
444
|
|
445 )
|
|
446
|
|
447 [3] => SimpleXMLElement Object
|
|
448 (
|
|
449 [@attributes] => Array
|
|
450 (
|
|
451 [Name] => ItemPage
|
|
452 [Value] => 1
|
|
453 )
|
|
454
|
|
455 )
|
|
456
|
|
457 [4] => SimpleXMLElement Object
|
|
458 (
|
|
459 [@attributes] => Array
|
|
460 (
|
|
461 [Name] => Operation
|
|
462 [Value] => ItemLookup
|
|
463 )
|
|
464
|
|
465 )
|
|
466
|
|
467 [5] => SimpleXMLElement Object
|
|
468 (
|
|
469 [@attributes] => Array
|
|
470 (
|
|
471 [Name] => ResponseGroup
|
|
472 [Value] => ItemAttributes,Reviews,EditorialReview,OfferSummary,Offers,Images,AlternateVersions,SalesRank,BrowseNodes
|
|
473 )
|
|
474
|
|
475 )
|
|
476
|
|
477 [6] => SimpleXMLElement Object
|
|
478 (
|
|
479 [@attributes] => Array
|
|
480 (
|
|
481 [Name] => ReviewSort
|
|
482 [Value] => -HelpfulVotes
|
|
483 )
|
|
484
|
|
485 )
|
|
486
|
|
487 [7] => SimpleXMLElement Object
|
|
488 (
|
|
489 [@attributes] => Array
|
|
490 (
|
|
491 [Name] => Service
|
|
492 [Value] => AWSECommerceService
|
|
493 )
|
|
494
|
|
495 )
|
|
496
|
|
497 [8] => SimpleXMLElement Object
|
|
498 (
|
|
499 [@attributes] => Array
|
|
500 (
|
|
501 [Name] => Timestamp
|
|
502 [Value] => 2016-12-15T23:12:34Z
|
|
503 )
|
|
504
|
|
505 )
|
|
506
|
|
507 [9] => SimpleXMLElement Object
|
|
508 (
|
|
509 [@attributes] => Array
|
|
510 (
|
|
511 [Name] => Version
|
|
512 [Value] => 2011-08-01
|
|
513 )
|
|
514
|
|
515 )
|
|
516
|
|
517 [10] => SimpleXMLElement Object
|
|
518 (
|
|
519 [@attributes] => Array
|
|
520 (
|
|
521 [Name] => Signature
|
|
522 [Value] => SUXfFZHQ74Joc+WDLx87uzemTdtHijNohykqafJXYKQ=
|
|
523 )
|
|
524
|
|
525 )
|
|
526
|
|
527 )
|
|
528
|
|
529 )
|
|
530
|
|
531 [RequestProcessingTime] => 0.3518217620000000
|
|
532 )
|
|
533
|
|
534 [Items] => SimpleXMLElement Object
|
|
535 (
|
|
536 [Request] => SimpleXMLElement Object
|
|
537 (
|
|
538 [IsValid] => True
|
|
539 [ItemLookupRequest] => SimpleXMLElement Object
|
|
540 (
|
|
541 [IdType] => ASIN
|
|
542 [ItemId] => B004Q3Q3Y4
|
|
543 [ResponseGroup] => Array
|
|
544 (
|
|
545 [0] => ItemAttributes
|
|
546 [1] => Reviews
|
|
547 [2] => EditorialReview
|
|
548 [3] => OfferSummary
|
|
549 [4] => Offers
|
|
550 [5] => Images
|
|
551 [6] => AlternateVersions
|
|
552 [7] => SalesRank
|
|
553 [8] => BrowseNodes
|
|
554 )
|
|
555
|
|
556 [VariationPage] => All
|
|
557 )
|
|
558
|
|
559 [Errors] => SimpleXMLElement Object
|
|
560 (
|
|
561 [Error] => SimpleXMLElement Object
|
|
562 (
|
|
563 [Code] => AWS.InvalidParameterValue
|
|
564 [Message] => B004Q3Q3Y4 is not a valid value for ItemId. Please change this value and retry your request.
|
|
565 )
|
|
566
|
|
567 )
|
|
568
|
|
569 )
|
|
570
|
|
571 )
|
|
572
|
|
573 )
|
|
574 */
|
|
575 ?>
|