Geocode an Address via Google Maps using PHP

I came across a situation today where I needed to interface with a third party component in my Joomla! application which handled store locations using the Google Maps API. I already added the ability to associate each entry with a user account and manage the entry from within the user profile manager (thanks to the new Joomla! 2.5 extended profile), but the problem came in when a user edited the address that it would not update the latitude and longitude within the component. To fix that, I hooked into the onUserAfterSave event, and used the following code to geocode the address that was entered, and then push the results to the store locator database.

This will work for anyone needing to Geocode an address using PHP.

Send SMS Alerts from RSFormPro the Easy Way

RSForm!Pro allows for some pretty advanced routing, mappings, and script access via the joomla admin panel. It’s probably the best Joomla! form builder out there as of right now. It’s almost on the same level as Gravity Forms for WordPress.

Anyways – recently I had to set up text message alerts for admins when there is a submission. Rather than building an integration with a service like twilio or something, I just came up with this rather simple little snippet. On the Properties tab of the form you want to add SMS alerts from, navigate down to the PHP Scripts item. In the second textarea, where it gives you access to $_POST, paste the code from below. (Remember to not include the <?php tag.) Then, change out the $to array to match the phone numbers and providers that you want to send messages to.

Recursive File Hashing with PHP

A little background: I developed this to create a drop-in hash file that will work with WordPress Exploit Scanner. As a developer, I periodically update to the latest nightly builds, and needed something to check the integrity of the system post upgrade, and to make sure that what I got was the real deal.

This could work for any security scanning system that accepts an array of file names and hashes.

Starting a Running Regimen

I’ve been putting on some access weight recently, what with my desk job and hour long commute – I haven’t made the time to stay as active as I should have been. I’m pushing almost 200 lbs, and figured that that’s gotta change. So, starting today, you’re going to start seeing some fitness and running updates here, along with the regular stuff.

My goal is to be able to run at least a half marathon (13.1 miles) by this summer. I downloaded a guide that gives you a good structure to go from couch potato to a half marathon runner is a little as 10 weeks. Download it here: Half Marathon Guide. I don’t know if I’ll be able to complete it in 10 weeks, but I’m pushing for it. It’s a rigorous schedule, but I’m going to try my best.

Hopefully, this’ll lead to a full blown lifestyle change for me. I want to be there for my family and be able to be active and have fun when Donny get’s older. I don’t want him to have a lazy dad.

I’ll also be reviewing some running merch as well, like my new Skechers GoRun running shoes as well as the best outfits to wear for different running conditions.

Wish me luck.