There are 2 configuration options available to you,  when you add the web page on your site, that will display the best-seller Amazon books.

$q  and   $SearchIndex

$q refers to a search term that will cause your page to list a particular topic.

$SearchIndex refers to a general product category, such as "books" or "dvd".

This information is explained by the documentation at the Carp home page. This is easy enough. These variables are initialized to sample values by the creator of Carp.

However ....


 ... before writing this PHP utility, shown below, I had to do a lot of trial and error with both of these variables before being satisfied with what products would actually show up. ( I realize that the products themselves changes, because this script will always reflect the latest best-sellers, but I wanted to make sure the right kind of products showed up)

With this tool, you

1. Simply first choose a 'category index'.  ( DVD in this example)

2. Enter in a subject  ( U2 in this example )

3. Click Test Search String

4. Finally -  if it displays what I want, I know what to put into those PHP variables I mentioned above, onto my live page.


Running the PHP Script: