SEOMoz – Third-Party Affiliate Programs

The following is a translation of ASP code to PHP for the following SEOMoz post:
Third-Party Affiliate Programs: Roll Your Own Instead

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

$AffiliateID = trim($_GET['affid']);
 
$CanonicalURL = $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
 
if (strlen($AffiliateID) > 0) {
	$CanonicalURL = str_replace("&affid=" . $AffiliateID,"",$CanonicalURL);
	$CanonicalURL = str_replace("&affid=" . $AffiliateID,"",$CanonicalURL);
 
	setcookie("AffiliateID",$AffiliateID,time()+60*60*24*90);
}
?>
 
...
 
 echo $CanonicalURL; ?>" />

Amazon Kindle (US Edition) now $259

Amazon has dropped the price again on their original 6″ U.S. Kindle ebook reader to $259. They have also introduced a discount on their International Wireless Kindle edition making it $279. Previously, there was a Kindle price reduction of $299. Now you can carry around your reference book and more for the same weight and dimensions as a copy of just the PHP reference book! Sleek and lightweight, Kindle is as thin as a typical magazine and holds over 1,500 books. An advanced display reads like real paper and boasts 16 shades of gray for clear text and crisp images. The current generation has improved page refresh: faster page flips as the e-ink changes the entire page. Even better, small changes to the page don’t require a full refresh (the black-white flash) of the entire page!

A kindle version of PHP Reference: Beginner to Intermediate PHP5 is available for $8.99 through Amazon.com, at just over half the price of the main book!

Amazon Kindle Reduced Price to $299

Amazon has dropped the price on their original 6″ Kindle e-book reader to $299. Now you can carry around your reference book and more for the same weight and dimensions as a copy of just the PHP reference book! Sleek and lightweight, Kindle is as thin as a typical magazine and holds over 1,500 books. An advanced display reads like real paper and boasts 16 shades of gray for clear text and crisp images. The current generation has improved page refresh: faster page flips as the e-ink changes the entire page. Even better, small changes to the page don’t require a full refresh (the black-white flash) of the entire page!

A kindle version of PHP Reference: Beginner to Intermediate PHP5 is available for $3.99 through Amazon, the lowest priced general PHP book available!

If you are more interested in the larger format Kindle DX 9.7″ model, it includes much better support for PDF files. You can then load the free PDF version of the PHP Book onto your DX at no additional cost!

8000+ downloads of PHP Book PDF!

Since tracking, over 8000 copies of this PHP book’s free PDF have been downloaded through lulu.com as well as directly through this book blog! This doesn’t include the downloads through other websites who are also hosting the PDF file completely legally.

To date, there have also been 97 revenue generating print copies of the paperback sold and 60 digital Kindle editions sold. The majority of sales are through Amazon.com, generating a lot less income per book than copies sold through lulu.com.

  • Total Revenue (all sources): $501.18
  • Costs to create the book: ~$600
    (computer monitor, ISBN, review copies, office space rent, etc.)
  • Hours spent writing: 175

In other words, with costs included, I’ve lost ~$100 creating the book. If that was not factored in, the hourly wage for creating the book so far would be $2.86/hour (in reality it is $0.00).

With over 8,000 downloads which are and will always remain free in PDF form, a donation of $1 for each download would have changed it to ~$33/hour. Would you consider purchasing a paperback PHP book copy today or donating to my hosting costs when downloading a free PDF of the PHP reference book? Thanks!

Save 10% on Lulu.com Orders in May!

Lulu.com, the publisher of the PHP Book are offering a 10% discount to purchasers during the month of April! Purchases made through Lulu.com provide me, the author, 241% more of the revenue.
In other words, instead of a separate website getting ~50% of the sold value, and myself getting a small percentage of the other 50%, I actually gain a lot more for, well, my work and time in creating the book!
 

Simply go to Lulu.com, click “Buy”, and enter code ‘BEACHREAD’ at checkout to save 10% ($16.17 total, without shipping)!
Hurry, the offer expires on May 31st, 2010!