Issues Synching Amazon Kindle Notes and Highlights to iPhone

The Issue

I don’t mind reading Amazon Kindle books on my iPhone, but sometimes a bigger screen is nice. Thankfully Amazon has Kindle apps for PC, Mac, iOS, Android, etc. The issue I’m having is that my notes and highlights don’t usually sync correctly from Kindle for Mac to Kindle for iOS.

I tried manually synching, but that just seems to push the furthest read page rather than notes and bookmarks. I tried all the combinations you can imagine in terms of the order in which I open the app on the two devices. No success.

The Fix

What I ended up having to do is archive the item on my iPhone and then re-download it to get the correct set of notes and highlights. My guess is that it’s a bug in the iOS app.

Anyone else having this issue and figured out a different work-around?


PHP script to send test emails on a schedule to make sure you are able to receive email

Ever wondered if your email was actually working? I’ve had numerous people over the past few years wonder the same thing. Ideally you would use a consistent, dependable email service provider (think Gmail, Hotmail, Yahoo!, etc.). But sometimes that isn’t an option. If you think you might be receiving email intermittently or not at all, feel free to use this script to send test emails to yourself on a regular basis. If you get the test emails, you know at least someone can get to you.

	print('Not sending an email after hours.');

// Get the current day of the week as an index (0=Sunday, 6=Saturday)
$dayOfWeek = date('w');

// Do not send the email on weekends
if($dayOfWeek == 0 || $dayOfWeek == 6)
	print('Not sending an email on the weekends.');

// Info of person to receive the tests
define('TO_EMAIL',		'');
define('TO_NAME',		'John Doe');

// Info of person sending the tests
define('FROM_EMAIL',	'');
define('FROM_NAME',	'Email Tester');

// Example: 8:00 am on 1 Nov 2010
$subject = 'Test: ' . date('g:i a \o\n j M Y');

$message = 'This email was automatically generated. Please send an email to if you would like to disable these automated tests.';

$result = mail(TO_NAME . ' <' . TO_EMAIL . '>', $subject, $message, 'From: ' . FROM_NAME . ' <' . FROM_EMAIL . '>');

And finally, setup a cron job that runs on a regular basis (every 15 minutes in this case):

*/15 	* 	* 	* 	* 	wget

I realize that you could do some of the scheduling being done in the PHP script in the cron job definition, but I wanted to have more control over that for future features (think pulling schedules from a database for a multi-user environment).


My New Pet Orb Weaver Spider

As I was mowing the grass in my back yard two weeks ago, I was startled by a huge spider that crept out from under a board on our fence. I wanted to take some pictures of it but after I finished mowing it was gone. Today, however, the same spider (I assume) kindly relocated itself to a very nice place from which to capture it.

Here’s a video of the spider in action:


Shorten URLs with Zend Framework and

This function uses version 3.0 of the API. You’ll need to register for an account with them if you don’t already have one. Then you can retrieve your API key and begin using it immediately.

function bitlyShorten($url)
	$client = new Zend_Http_Client('');

		'longUrl' => $url,
		'login' => 'xyz',
		'apiKey' => 'xyz'

	$response = $client->request();

		$response = Zend_Json::decode($response->getBody());
		if($response['status_code'] == 200)
			return $response['data']['url'];
	return (false);


$myLongUrl = '';
$myShortUrl = bitlyShorten($myLongUrl);