Resources for Developers Using Amazon Associates Web Services
· Home  
· Search  
· Browse Nodes  
· Data Feed?  
· One-Second Rule  
· PHP Examples  
· Tools  
· Understanding A2S  

Create a custom Amazon Associate Store in minutes with Associate-O-Matic.

PHP Examples

Getting REST Results with Simple Caching
Here is a function with demonstrates how to combine fetching REST results from Amazon's A2S servers with a simple caching scheme using a MySQL database. function getPage($url, $maxage=7, $cache = true) { $body = ""; if ($cache) ... [More]
PHP A2S Demo 1 - ItemLookup
The following is a simple example of using PHP to perform an A2S ItemLookup operation and display the information in HTML. It uses functions usually included in PHP version 4 and later. <?... [More]
Trimming Descriptions and Reviews
Often you would like to trim a product description or customer review to a shorter length. The following PHP function will trim a string to a desired length. It breaks the string at a space. function cutString($text, $limit) { $text =... [More]
Using CURL to Get Results from ECS
The following PHP function allows you to fetch results from an A2S query including the status code. It returns the text returned from the URL. It also returns the HTTP status code and the HTTP headers. function getAmazonPage($url,... [More]

Copyright © 2008 by Roger Smith