Every so often, I’m on a road trip, driving around the great southern states, and I’m overtaken with a very strong need for some public radio. Unfortunately, I don’t have one of the handy NPR Station Locator Maps. I also don’t have an iPhone, for which I could get the free NPR Station Locator app. What I have is a work-detail Blackberry and soft sport for dabbling in scripting languages. So I took the opportunity to learn some PHP and build a rudimentary station finder using the NPR API.
NPR of course offers a spiffy web-based station finder map for scoring your closest Wait Wait Don’t Tell Me! or All Things Considered fix. But it’s a little too full-featured to work on a dinky mobile browser. But let’s also not kid ourselves about functionality here; this was an excuse to learn some super-basic PHP:
We’ll call this version 1.0 because it lacks anything resembling a design; it doesn’t verify that you’re feeding it ZIP codes or return appropriate error messages if nothing is in range; and it doesn’t indicate station strength (though station strength is something you can figure out pretty quickly with your tuner).
What is does do is query the NPR API and return a list of the closest stations with city and call number, ranked in order of proximity. Which is all you need when you know you’re missing Michelle Norris and all you can find is Delilah.
FYI – NPR has a mobile station finder: m.npr.org/statfind.jsp
The “classic” finder on npr.org was totally useless on my BlackBerry. Didn’t work at all.
Thanks to DLP for pointing out their mobile version.
However,I like Andrew’s better, because it identifies the city the station is in.
Thanks for making it available!