[x]Blackmoor Vituperative

Monday, 2010-05-24

DriveThruRPG affiliate links

Filed under: Gaming,Programming — bblackmoor @ 16:57

DriveThruRPGI had a little bit of free time today, so I whipped up a couple of dynamic affiliate links for DriveThruRPG, a very cool source of gaming PDFs.

The script can be called one of three ways. One way creates an affiliate link to one of the five newest items added to DriveThruRPG, the second creates an affiliate link to one of the five best-selling items, and the third creates a random link to an item on either list. I considered animating the affiliate links, so that a different item would appear every few seconds, but to be frank, animated advertisements annoy me. Actually, I do not care for advertisements at all — I hide them, as a matter of fact.

Does this make me a hypocrite? Maybe. However, these are not just advertisements — they are also news. For that reason, I think they are useful, even to people like me who routinely hide ads.

It’s my intention to add these to this blog and to RPG Library, the gaming community site I maintain, but I do not really expect to see much revenue from these. I mainly created them as a service to the gaming community. For that reason, I added a variable so that other people can replace my affiliate ID with their own, if they would like to use these on their own web site.

So check it out. If you have any questions, let me know, and I will try to answer them.

Update 2010-05-25: I added some error-checking in case the description field in DriveThruRPG’s RSS feed contains some bad tags. It doesn’t actually do anything with the errors, but it keeps the script from failing.

Update 2010-05-25, part 2: I expanded the script to be able to handle any of OneBookShelf’s sites.

Comments are closed.