July 2004
Intermediate to advanced
479 pages
12h 30m
English
Someday all data will be available as RSS. Get a head start by syndicating Amazon search results.
With the wide audience for RSS data, just about everything is being turned into an RSS feed. This hack turns any Amazon Web Services (AWS) query result into an RSS feed.
This hack uses ASP, which runs on Windows servers running IIS. The logic is straightforward, though, and could be translated to any scripting language. You also need an Amazon developer token and an Amazon associates tag, both available from http://www.amazon.com/associates.
The file
amazon_rss.asp
is in the file archive for the book. Be sure to change the
Const declarations to match your setup.
<%
'' AMAZON-RSS.ASP
'' Sean P. Nolan
'' http://www.yaywastaken.com/
''
'' This code is free for you to use as you see fit. Copy it, rewrite it,
'' run it yourself, whatever. But no warranties or guarantees either. Who
'' knows what the hell it does. Not me, that's for sure!
''
'' Generates an RSS 0.91 feed from an Amazon book query
''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Const MAX_PAGES_DEFAULT = 10
Const DEV_TOKEN = "insert developer token"
Const AFFILIATE_CODE = "insert associate tag" Const XSL_FILE = "amazon_lite.xsl" 'change to heavy for more info. Dim szTitle, szMaxPages, nMaxPages Response.ContentType = "text/xml" Server.ScriptTimeout = 60 * 4 ' 4-minute maximum Response.Expires = 0 szMaxPages = Request.QueryString("maxpages") ...Read now
Unlock full access