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.