glad to help.
Note:
<cfset filepath="C:\www\test\www\capitalidea\content\books">
the path to save the html snippet created by the custom tag.
affid. the amazon associate id from ... amazon
Book = AIBN code of the book.
Example:
http://www.capitalidea.com/amazon.cfm
== myFavouriteBooks.cfm ===
<cf__get_amazon affid="capitalidea0d" Book="0439139597">
===========================
You get the ISBN number from the amazon site directly
Example:
Hardcover - 752 pages (July 8, 2000)
Scholastic/Arthur A. Levine; ISBN: 0439139597
== _get_amazon.cfm ========
<cfhttp method="get"
url="http://www.amazon.com/exec/obidos/ASIN/#attributes.book#/icigroup/capitalidea0d"
resolveurl="yes">
<cfset filepath="C:\www\test\www\capitalidea\content\books">
<cfset content = cfhttp.filecontent>
<!-- News Item -->
<cfset startpos = FindNoCase("/exec/obidos/handle-buy-box=", Content)-50>
<cfset startpos = FindNoCase("<form", Content, startpos)>
<cfset endpos = FindNoCase("</form>", Content,startpos)+7>
<cfset Content = Trim(Mid(Content, startpos, endpos - startpos))>
<CFSET Content =
replacenocase(Content,"/g/detail/addtocart","http://www.amazon.com/g/detail/addtocart","ALL")>
<CFSET Content =
replacenocase(Content,"/g/gift-services/buttons/addtoWL","http://www.amazon.com/g/gift-services/buttons/addtoWL","ALL")>
<CFSET Content =
replacenocase(Content,"/g/detail/buybox/add-to-shopping-cart-blue.gif","http://www.amazon.com/g/detail/buybox/add-to-shopping-cart-blue.gif","ALL")>
<CFSET Content =
replacenocase(Content,"/g/gift-services/buttons/wl_white.gif","http://www.amazon.com/g/gift-services/buttons/wl_white.gif","ALL")>
<CFFILE ACTION="Write"
FILE="#filepath#\#attributes.book#.html"
OUTPUT="#content#">
===========================
From: "Joseph J. Sanger, M.D." <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Amazon Tags
Date: Tue, 11 Jul 2000 18:30:22 -0400
Eric, I am VERY intrigued by this code ... could you give me a
pointer or two on how to use it? For example, where can I get these
two parameters in order to grab info on a book? It's not obvious to
me from crusing Amazon's site. Thanks very much in advance.
><cfparam name="attributes.book" default="???">
><cfparam name="attributes.affid" default="">
>
><cfhttp method="get"
>
> url="http://www.amazon.com/exec/obidos/ASIN/#attributes.book#/icigrou
>p/#attributes.affid#"
> resolveurl="yes">
>
><cfset filepath="C:\www\content\books">
>
><cfset content = cfhttp.filecontent>
>
><cfset startpos = FindNoCase("/exec/obidos/handle-buy-box=", Content)-50>
><cfset startpos = FindNoCase("<form", Content, startpos)>
><cfset endpos = FindNoCase("</form>", Content,startpos)+7>
>
><cfset Content = Trim(Mid(Content, startpos, endpos - startpos))>
>
><CFSET Content =
>replacenocase(Content,"/g/detail/addtocart","http://www.amazon.com/g/
>detail/addtocart","ALL")>
><CFSET Content =
>replacenocase(Content,"/g/gift-services/buttons/addtoWL","http://www.
>amazon.com/g/gift-services/buttons/addtoWL","ALL")>
>
><CFFILE ACTION="Write"
> FILE="#filepath#\#attributes.book#.html"
> OUTPUT="#content#">
>
>
>From: Stuart Duncan <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Amazon Tags
>Date: Wed, 21 Jun 2000 10:27:13 -0700
>
>Hey all,
>
>I've come across a few interesting tags for searching through Amazon's
>books and such....
>but what I really need is something which allows me to actually select
>individual books and display those on the site.
>
>I was thinking, something where I could just enter the product id form
>Amazon, and the tag would go and fetch all the information from them on
>that book.
>
>Has anyone come up with an easy way to do this, or do you know of any
>custom tags that does this?
>Any help on this would be greatly appreciated.
>
>Stuart Duncan.
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_tal
>k or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
___________________________________________________________________________
Joseph J. Sanger, M.D. | Phone: (212) 263-7410
Associate Professor of Clinical Radiology | Fax: (212) 263-2039
Director, Division of Radiology Informatics |
Co-Director, Division of Nuclear Medicine |
Co-Director, Nuclear Cardiology |
New York University School of Medicine | [EMAIL PROTECTED]
___________________________________________________________________________
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.