Niall McMahon

The ramblings and occasional intellect from a web developer, music lover and genealogist.

Using the Geolocation API together with Google Maps API

→ Posted in Web Development on 13th February 2012

Although not officially part of the HTML5 specification, Geolocation has become one of a number of new technologies that have recently come to light with advent of HTML5. Remy Sharp and Bruce Lawson also felt it important enough to write a whole chapter about in their brilliant book, Introducing HTML5.

The Geolocation API is used to find the location of your users. You've probably noticed a similar technology on many apps used on smartphones — checking into places through Facebook or Foursquare, for example. The same can be done with most modern web browsers. When used in conjunction with the Google Maps API, you can get some pretty cool results and add some great features to your website or web apps.

It would help if you had a basic understanding of Javascript, jQuery and PHP for this article, but I try to explain everything, so it isn’t essential.

Integrate Twitter feed with a cache file using PHP

→ Posted in Web Development on 16th August 2011

The company I work for have numerous Twitter accounts for the various parts of the business, and wanted these feeds to show on the respective websites. I had done something similar to this in the past but had faced problems then with Twitter's request limit (which I believe is around 150 requests an hour). This caused the feed to disappear until the limit reset. I decided to look into writing a reliable solution for this.