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_search_upc

Returns up to 30 articles in an array with the parsed XML-result

amazon_search_upc(var upcs, int mode [, int type [, int format]])

With this function you can query amazon™ for products by upcs. If you want to receive more than one product you can separate the upcs by comma, semikolon or space. You can use up to 10 upcs in the HEAVY and up to 30 in the LITE version. The mode defines the mode the search results should have (valid are "music" and "classical"). Setting the type is optional: It gives you the possibility to determine the volume of the reply. LIGHT(default) returns less product-information than HEAVY.
If you are able to create XSL pages, you can set the URL of such a page as format (f.e. "http://www.yourserver.com/directory/file.xsl") and the result of this function won't be an array, but the XSL with the data the search returned.

Example 1. Get product with UPC "039480001X":

$Reply=amazon_search_upc("039480001X");

If you want to know how to work with the array the search returnes, please have a look at Work with the search reply.


© by Filzhut.net, Daniel Filzhut 2002