Simple Weather logo There’s a site called SimpleWeather. It prides itself on being simple. Enter a zip code, and you get the weather. Go there again, and it will automatically show you the current weather for your location. It’s so awesome that it can remember your location.

But being too simple has it’s drawbacks, such as being able to be ripped off very quickly and easily, such as in 1 hour.

WeatherSimple 😉

It took me just about an hour to make that in 120 lines of PHP (plus about 35 lines of javascript and 20 of CSS), and I have a site that does everything this SimpleWeather does, and a little more.

Such as not being limited to a zip code, you can enter “Houston”, and be given the option of choosing the exact location. It also does the requests in AJAX, though not very well.

It doesn’t look as pretty, but probably another hour in Photoshop and messing with the CSS, it could be there. Nor does it have a nice domain name associated with it, because I have no plan on launching it as some site.

It also fixes the problem with not showing the High after 3 PM, by a incredibly simple fix, just show the next day’s.

Really, what makes it so easy, is that basically supplies everything you need. It even gives you images and tells you which image to use. Now, it does give you some pretty annoying restrictions, like your logo can overpower the Weather Channel logo, you can’t fuck with their logo, such as the ‘W’ in “Weather” is 1/2 of the space of the word “” from the sides, and a whole set of caching requirements.

Note: I didn’t really follow any of them. I did give attribution though.

Anyways, here’s the source. You need the class SimpleXML, which is the reason it’s hosted on xrho instead of this site, since PHP 5 is required.

Update 04/19:

I’ve added support for permalinks, like from a suggestion on this TechCrunch article about SimpleWeather, which I can’t believe they actually mentioned.

3 thoughts on “Simple Weather”

  1. Hello

    Seems like weather just changed their xml format as your code is no longer working.


  2. Is it possible to get this same info to work inside of text widget? In other words, is there some code that I could just drop into a text widget to make this work? The normal widget doesn’t look right within my wordpress theme and styling. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *