Filzhut.net Filzhut.net amazon_functions for PHP (Version 0.9)
Making the work with Amazon.com™ Web Services Version 1.0 much easier

amazon_create_productlist

Generates a product-list as an HTML-table.

amazon_create_productlist(array xmlresult [, int noofitems [, int link [, int align]]])

This function returns a productlist-table which you can use to link to amazon as well as to a script that contains detailed information on the product. Before you run this function you first have to run a search-query like amazon_search(). The array you receive with this function is the xmlresult you need to run amazon_create_teaserlist(). Optional parameters are the noofitems which will be replied (1-10, 5 is default), the align of the table (right, left or center). With the parameter link you can define a URL as a link for each item. To improve the use of this function in cooperation with other scripts, the flag "&ASIN=" will be added and will contain the ASIN of the selected product. If you leave this field blank, there will be a directly link to amazon™.

Example 1. Returns a product-table with dvds by actor "LeAnn Rimes", the results should link to "amazon_example_productinfo.php":

$Author="Tom Clancy";
$Data=amazon_search_actor("LeAnn Rimes","dvd");
$HTMLTable=amazon_create_teaserlist($Data,5,"amazon_example_productinfo.php");
echo $HTMLTable;

Will return:
Coyote Ugly

Touchstone Video
Released: 29 December, 2000

List Price: $19.99
Our Price: $16.99
Used Price: $10.95


VH1 Divas Live 99

Image Entertainment
Released: 04 April, 2000

List Price: $24.99
Our Price: $22.49
Used Price: $15.88




© by Filzhut.net, Daniel Filzhut 2002