General, Surfing

phpBuoy 1.0.0 Released

I wrote what became [url=http://www.surfimplement.com/phpBuoy/]phpBuoy [/url] because a friend of mine, when questioned about what could be improved about [url=http://www.surfimplement.com]Santa Barbara Surf Implement[/url], said that I should include the buoy data for the most relevant (to Santa Barbara) offshore buoys. I mulled over it for a long time, not really sure whether I wanted to include the data in text or image format, or whether I wanted to try to put the data (buoy readings) directly on my page, or simply link to the relevant buoy data pages.

Since the [url=http://www.ndbc.noaa.gov/]National Data Buoy Center[/url] provides their buoy data in text files that are updated hourly, I decided to modify the PHP script that is used for pulling the news headlines on this site, and build a little parser that would pull the most recent buoy reading file for a given buoy (station), parse it, cache the output, and then display it on a page.

I think it worked out pretty well. On the Santa Babara Surf Implement homepage, you can now get the up-to-date buoy readings for the Point Conception, West & East Santa Barbara Channel, and Santa Monica Basin buoys…without having to click through multiple pages on the NDBC site. It’s all right there. Since I’ve built SBSI primarily with a view towards what makes my own surf forecasting easier/better/more convenient, I have no idea whether or not someone else will find it useful, but all of the unsolicited feedback I’ve received on the site to date has been positive, so I’ll just assume I’m doing something halfway close to right.

In any event, I’m stoked to release phpBuoy because it’s my first PHP script that I’ve turned loose on the world. It’s currently located up on [url=http://www.hotscripts.com]HotScripts[/url], the place I always go first before trying to write any new code. In fact, the entire reason I ended up kitting together phpBuoy was only because there wasn’t a similar script already available. The “scratching the itch” explanation, you know?

[url=http://www.surfimplement.com/phpBuoy/]phpBuoy [/url] will pull buoy data from any NDBC station number you indicate, and it’s super easy to configure. It’s meant to be used as an include file (it formats the output in a nice little HTML table), but you can tweak it however you like, assuming you’re reasonably proficient with PHP. It can also be setup to display the output in either Metric or English measurements, and can display the date/time info in either U.S.-style 12-hour clock/MM-DD-YYYY format or international style 24-hour clock/DD-MM-YYYY format. Again, super easy to change to suit your needs.