Automatically adding Amazon affiliate codes
January 11, 2012 2:27 PM Subscribe
Is there a straightforward way to transform Amazon links to add an affiliate code?
I understand that Metafilter rewrites Amazon links to add Matt's affiliate codes, and I'd like to do the same for a site I run. Is there a straightforward way of doing it? It would be good to accept and identify any of Amazon's multiple formats.
I can either do this server-side with java, or in the page with javascript.
(Bonus for catching and stripping out existing affiliate IDs).
posted by fightorflight to computers & internet (4 answers total) 6 users marked this as a favorite
JavaScript
PHP/JS (for PHP->Java inspiration)
posted by Foci for Analysis at 2:44 PM on January 11