The Code
The file with the helper functions is now ready to be included in any
PHP script. This script has several functions that handle requesting
information from Amazon and generating HTML based on the responses.
Pick your favorite ASIN and create a file called detail.phpwith the following code:
<?php
include('amazon_functions.php');
$Data=amazon_search_asin("0596004478","HEAVY");
$ProductInfoHTML=amazon_create_productinfo($Data);
echo $ProductInfoHTML;
php?>
TIP
Be sure to save both amazon_functions.php and
detail.php to the same directory on your web
server. Also, if you have a directory specified as an
include_path in your php.ini
configuration file, you can save
amazon_functions.php there and it'll be
available to all of your PHP scripts.
Thanks