GeoIP Weather

About

GeoIP Weather is a PHP web application that uses GeoIP City to geocode a user's IP and makes requests to the weather.com XML API to return local weather data to the user.

History

GeoIP Weather was initially written as a weekend project in late July 2009. Four months later, it was linked to from the front page of reddit even though it wasn't quite ready for prime time. It generated a fair bit of interest and praise despite the defects so a decision was made to formally release the source code and continue active development.

Demo

A live demo is available at http://geoipweather.com/ and a screenshot is available.

Overview

  • Requires PHP 5.2.
  • Conforms to the weather.com API (including restrictions like displaying weather.com ads/links).
  • Less than 500 lines of code/HTML.
  • Downloads

    The latest version is 0.4 and it was released on January 18th, 2010.

  • geoipweather-0.4.tar.gz
  • geoipweather-0.4.zip
  • Future Enhancements

  • Tidy up the geoipweather class and the UI separation.
  • Add more foreign character to English character mappings to enhance compatibility with the weather.com location ID search API.
  • Support toggling between Celsius/Fahrenheit.
  • Support multiple weather providers. weather.com has temporary failures quite often.
  • Changes between 0.3 and 0.4

  • Caching is now done on-disk instead of via pecl-APC. GeoIP lookups are now done in pure PHP rather than through the pecl-GeoIP extension.
  • A bug affecting South Korea lookups was fixed.
  • Author / License

    GeoIP Weather was written by Jolan Luff and is released under a permissive ISC-like license.

    Contact

    Feedback and patches may be sent to geoipweather@gormsby.com.