Dynamic Weather with NOAA, PHP, jQuery, and HTML templates

One of our aims with our new alumnae/i site was to give alums who may be far away a chance to reconnect with the campus they know and love. Of course we have the usual imagery, stories, social networking, etc. but there was one feature—weather—that could evoke the moment, in real-time on campus.

In order to make that connection as immediate and palpable as possible, we couldn’t allow the weather to cache, or only update on page load. All it took was some jQuery and HTML templates added to our existing PHP script which was already pulling an XML feed from NOAA. Read on to see how we did it…