I am the Camp Master!

I was looking at the National Park Service reservations page today, as I had come across a del.icio.us bookmark I made sometime last year about this awesome camp site in Marin county. (I originally became aware of this place via an Ask MetaFilter thread about Bay Area beach fire regulations. Anyway, for reasons that become obvious as you read about this place, it books up hell of early, especially on weekends! (I mean, seriously… Check out this Google Satellite view of the place! [It should be dead-center on that map. Zoom out a little bit if you're having a hard time placing it.]) I remember thinking to myself, “Hm… If I ever wanted to camp there, I’d have to remember to book a spot as soon as the NPS opens reservations for the year.”

Well, it seemed pretty fortuitous that I stumbled across my old bookmark today, as here we are only 5 days into the new year. Perhaps now would be my chance to book a sweet weekend spot! (Leave aside the fact that I have no idea who the hell out here even would want to go camping, but hope springs eternal =) So I went to the site, pulled up the reservations app and discovered that the NPS only allows reservations up to 150 days in advance! As of today that brings us to the first week in June. Good camping weather, to be sure, but not as awesome as July or August might be! Worse, all the weekends through June were ALREADY booked! This was some serious BS.

So, I did what any good web developer does when confronted with a HTML Forms based system that doesn’t work to their liking, I attempted to hack it! First I saved a local copy of the page that comes directly before the “Confirm Reservation Page.” I edited the source for this file so that the hidden fields on the form allowed me to reserve any day through the end of the camping season. (Which date was actually *included* as a hidden field, only serving to emphasize the arbitrariness of NPS’ 150-day limit!) I then loaded the hacked form into my browser and went right for the throat… Fourth of July Weekend!

To the NPS’ credit, they anticipated my ruse and had blocked cross-domain form submission (i.e. they would not allow a form hosted at “localhost” to submit to a page hosted at “reservations.nps.gov”). This was a bit discouraging, but I recalled some stuff I’d been doing at work recently with “HOSTS” files. These are files that your computer consults *before* doing DNS lookups on sites, to see if there are any cases where you want to ignore the DNS and substitute your own IP address instead. A few edits later and I could reach my local Apache server by typing reservations.nps.gov into Firefox. I loaded my local copy of the NPS’ form into my webroot, named it identically to the remote version and loaded it up. This time when I clicked submit the NPS Site was all, “July 4th weekend? Fuck it… Why not?”

Totally Awesome…

So now the question(s) is/are:

  1. Who wants to go camping?
  2. When? (post-June 4th)
  3. Will the NPS be suspicious if a reservation comes in that exceeds their 150 day advance booking limit? (Perhaps I can minimize this risk by waiting until a few days before the dates would become “officially” available and booking then?)

Anyway, regardless of what goes down, I’ve had a gloriously geeky time wanking around with this stuff tonight. Quite frankly, in a tech-y town like this, I’m surprised nobody’s beat me to it! (Although maybe they have, and have had their hacked reservations rejected? Or maybe I am just the only HTTP/PHP geek who also enjoys camping?)

2 Responses to “I am the Camp Master!”


  1. 1 lion-gv Jan 6th, 2006 at 12:09 am

    wow, nice hack

  2. 2 Eric Jan 6th, 2006 at 1:29 am

    Yeah, in all likelihood, I won’t be able to advance book _way_ past the deadline, but I can at least maybe automate something so that I get first crack at dates as they become available. =)

Comments are currently closed.