Finding distances between two zip codes in PHP

I found this script to calculate distances between two zip codes from PHP (requires MySQL). According to this Idealog post, the calculation relies on a text file of Zip code lon/lats from CFDynamics, available on the downloads page.

I have yet to try it; however, I have a specific implementation that I was needing it for. Does anyone else have a better way to align searcher's proximity to location-based data? I'd like to classify by city, but I'm sure that is a lot more of a gray area than allowing the searcher to specify a specific radius in which to search or letting the resource specify maximum distance to travel.

Added 2008.11.30:
I love Twitter. A few hours after posting this, I received a suggestion that I could get longitude/latitude from Google Maps.

On, I found the following question: I need to convert addresses to latitude/longitude pairs. Can I do that with the Maps API?

Yes, this process is called "geocoding." The Google Maps API provides two methods for performing geocoding. If you wish to geocode from within your Google Maps API application you can do so using the GClientGeocoder object. Alternatively you can send geocoding requests directly to the HTTP geocoder.

Exit the monkey

It's been a roller coaster year for my running. 8 PRs this year, including back-to-back 10 miler PRs (-10 minutes each time) and a PR by 55 minutes (3:39) at Flying Pig. Then came a rough showing (4:42) at the Hatfield-McCoy Marathon, followed by tendonitis and an SI joint injury. My physical therapy ended September 25th, so the Flying Monkey marathon came just 8 weeks + 3 days after physical therapy ended. I made it up to 50 miles for one week prior to tapering (40, 30 and 14 miles for the 21 days prior to Monkey).

We had a send-off for a co-worker (beer involved) on Friday, and then wine Saturday, so hydration wasn't optimal.

On to the report:
It seemed to take forever to get to Mile 2. This was no trick by the Monkey RD; my Garmin 305 confirmed that I was only at mile 2. There's nothing like wishing a MARATHON was over at mile 2. This feeling continued through mile 6. I managed to get a little benefit on the first couple downhills, but my joints paid a heavy price for the extra speed I gained. The downhills also caused so much friction that a large, heart shaped blister formed in the front arch area of my right foot. (The good news is, my forefoot actually went numb from the pain).

It was at this point that I resigned myself to slower marathon than I had hoped for that I started enjoying the scenery. The trees provided a nice autumn picture, the sun highlighting the trees at times. At each water stop I paused, mostly to rest.

By the second half, I couldn't control my stride enough on the downhills to get much benefit from them, and had some pain reminiscent of SI joint pain at mile 18, and had to walk the downhill. ...I had several miles in which I had to break stride and walk, principally miles 19-20, where the full elevation was scaled in two miles, mostly in 19. Amazingly, I had something in the tank left for the last two miles, and managed to get my second best marathon time (4:30:30) on minimal time to train after recovering froom injuries.

Due to the cool conditions, I held things together here better than my Hatfield-McCoy performance. I'm certain that a summer Harpeth Hills course would have been far more brutal than H-M. H-M has one huge hill and some relentless small hills. Flying Monkey has several relentless large hills:

Summary Data
Total Time (h:m:s) 4:30:30 10:21 pace
Moving Time (h:m:s) 4:30:16 10:21 pace
Distance (mi ) 26.10
Elevation Gain (ft) +3,850 / -3,849
Temperature (°F) 46.4°F avg. 51.8°F high
Wind Speed ( mph) S 6.0 avg. S 6.9 max.

Elevation Data

Elevation Change Total (ft)
Total Elevation 7,699
Elevation Gain 3,850
Elevation Loss 3,849
Net Elevation Change 1

Vertical Speed Average ( ft/min) Maximum (ft/min)
Ascent 14.2 288.1
Descent -14.2 -219.0

Grade Average (%) Maximum (%)
Overall Grade 0.0 --
Ascent Grade 5.7 22.5
Descent Grade -5.5 -23.3


1 9:16
2 8:16
3 8:24
4 9:10
5 9:02
6 9:11
7 8:47
8 10:07
9 9:20
10 9:49
11 10:09
12 9:54
13 10:39
14 9:42
15 11:26
16 10:02
17 11:04
18 9:56
19 15:01
20 12:36
21 10:15
22 13:33
23 11:32
24 12:48
25 10:10
26 10:09

"Ready" to "run" the Flying Monkey Marathon

Well, I'm present for the Flying Monkey Marathon, at least.

Met fellow members at the packet pickup... One of them asked me if me if I had driven the course yet. I said that I hadn't, to which he responded that I probably shouldn't.

I then remarked about my shins hurting a little. The response... "It won't matter, because your legs will be numb after the second mile anyway."


All for this little finishers... umm.... medal?

Less than 16 hours to go.

Gmail terminal theme--for your inner nerd

I don't know if I like it for nostalgia and geekiness, or just plain geekiness. There's only one thing I'd change with the terminal theme... make it truly like the BBS experiences of 15+ years ago. I want ANSI animation and color ANSI art--especially for the Gmail logo.

Added: Even more importantly, the terminal theme works great if you get LISTSERV mailings that have tables rendered in all ASCII characters or code.

Taper madness - Enter the Monkey

After quickly building up to 50 miles per week (+5 miles per week) for one week, I had an 80% and 60% week the last two weeks, and 14 miles this week on Monday and Tuesday.

The goal? The Flying Monkey Marathon. After finally pondering the elevation chart of this nutcase runner's marathon through Percy Warner Park, I can only conclude that it is a fortunate time to have a gut-busting gorge-fest four days later (that would be U.S. Thanksgiving for the international folks). I certainly won't be interested in running, after all.

Flying Monkey Elevation

I ran the Hatfield-McCoy marathon earlier this year, and I'm well aware of how trashed your quads fear after such steep downhills. Unfortunately, while the Hatfield-McCoy had one steep downhill, the Flying Monkey has 9-10 steep downhills of 1/3 to 1/2 the elevation drop.

Hatfield-McCoy Marathon

Less than 60 hours to go.

I suspect that the delicious bookmark plug-in for Firefox 3 is not keeping me logged for two weeks.

Not only that, but whenever I'm required to log-in to bookmark a page, the plug-in does not continue on to actually creating the bookmark.

This morning I was forced to log in. I believe the loss of information is coinciding with Firefox updates. Anyone else have this experience?

Home PC:
2008.11.15, 9:15 AM
2008.11.29, 2:29 PM
2008.12.14. 6:16 PM

Work PC:
2008.11.26, 10:01 AM
2008.12.11, 5:08 PM

Updated 2008.11.29: So far, no glitches. However, I still dislike the fact that the log-in prompt prevents tagging and you have to have to select the tag icon again after logging in.

Updated 2008.12.11: Looks like everything's fine, just that I'm overly sensitive to having to login.

Autotext lines in Word (using 2003 here)

Sorry if this is pretty trivial for the true power users of Word...

I don't know if Word 2007 works this way or not, but I've discovered a couple additional characters in Word that auto-correct to divider lines. (Other than 'equals', 'minus', and 'underscore'). The 'hash' divider was of the most interest to me, as I'm trying to write a white paper and need distinctive, yet compact, format markings. (The quicker the better, as well.) Just enter 3 successive '#' (hash), '~' (tilde), '-' (minus sign), '=' (equals), '_' (underscore), or '*' (asterisk) characters and immediately press enter. The text will be replaced by a dividing line.

(This trick does something similar OpenOffice 2.4.)

Reading List by Amazon

It looks like LinkedIn has found a way to make itself relevant for day-to-day use... The Amazon Readling List provides a way for you to post what you're currently reading, want to read, or have read. You can also see the contents of other people's reading lists--in your network, in your industry, or all recent updates. Your reading list will automatically appear on your LinkedIn Home and Profile pages.

So far, I only have one book listed. I'll probably start adding to this reading list from my Safari bookshelf list, and all the various other lists that I've been compiling over the last couple of years.

You can get to my LinkedIn profile at

Reading List Application full view:

On your LinkedIn Home:

On your LinkedIn Profile:

Adding from featured applications page.