Services_Amazon
[ class tree: Services_Amazon ] [ index: Services_Amazon ] [ all elements ]

Source for file amazon_ecs4_cache.php

Documentation is available at amazon_ecs4_cache.php

  1. <?php
  2. //
  3. // Example of usage for Services_AmazonECS4
  4. //
  5. // * VERY IMPORTANT *
  6. // YOU NEED TO CHANGE THE SUBSCRIPTION ID TO SOMETHING OTHER THEN XXXXXXXXXX
  7. // * VERY IMPORTANT *
  8.  
  9. require_once 'PEAR.php';
  10. require_once 'Services/AmazonECS4.php';
  11. require_once 'Cache.php';
  12.  
  13. $amazon = new Services_AmazonECS4('XXXXXXXXXX');
  14. $amazon->setCache('file'array('cache_dir' => 'cache/'));
  15. $amazon->setCacheExpire(60)// 60 seconds = 1 min
  16.  
  17. $options = array();
  18. $options['Keywords'$_GET['keyword'];
  19. $options['ResponseGroup''Medium';
  20. $result $amazon->ItemSearch('Books'$options);
  21.  
  22. if (PEAR::isError($result)) {
  23.     echo $result->message;
  24. else {
  25.     echo $amazon->getProcessingTime('seconds';
  26.     var_dump($result);
  27. }
  28.  
  29. ?>

Documentation generated on Mon, 11 Mar 2019 14:12:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.