~ divider ~

y ou may have noticed that, at various places on this website, I have a list of links to a number of different bookstores. I do this because I think it’s important for people to be given the option to purchase books from local, independent bookstores as well as major chains and massive online retailers. I like it when people sell books, and I don’t much care who the people are selling books. I think most people agree. The reason they tend to link to only one retailer is that while the spirit is willing, the flesh doesn't want to create 15 different links every time I mention a book. That's why I have written a script where all I have to do is input one ISBN, and it will automatically generate links to multiple bookstores:

I want to make this script available to everyone. This page is a work in progress: eventually, I hope to write a very robust script, as well as set up a WordPress plugin so as to encourage mass adoption. Right now, however, this page provides two things.

  1. It provides links to the PHP code that I use, as well as instructions so you can adopt it for use on your site. This is not for the faint of heart; your site must run PHP, and you should feel comfortable editing PHP code.
  2. For those who cannot run PHP, this page generates HTML code that can be copied and pasted into your html or WordPress site.

~ divider ~

t his form will generate links that you can copy and paste into your html or WordPress site.

Note: This script generates broken links if the ISBN is incorrect or if the book is not yet listed on the website. Also note (major note) that I have not yet set this up to use ISBN-10s. I realize that this means that older books can’t be included. I will fix this.

ISBN-13 (enter without dashes):

~ divider ~

a lternately, if you feel comfortable using PHP, feel free to use my PHP scripts directly. They are released under the GNU General Public License. They are also a marvel of hackery. I’m an author, not a web-programmer, and it shows.

A stripped down version of the script is available; you can also see the script that I actually run here.

Here is how you use them:

  1. Create a file, containing one of the above scripts. You might call it “isbngenerator.php” or something like that.
  2. You need an ISBN-13 (I’m really sorry to this is not going to work well for people who have an older backlist. I’ll try to retrofit at some point but I have to admit that this was written very selfishly with the 2009 or 2010 debut author in mind. So let’s say you have your ISBN-13. It should look something like this: 978-0-373-77427-2. Insert the following code in your php webpage (if you don’t have php webpages, none of this is going to work!):

Note that you must strip the ISBN of dashes for this to work, and you must use an ISBN-13. There you go. It’s that simple.

covers © 2011-2020 courtney milan
site design & text © courtney milan, 2007-2020 | privacy & disclosures