Functional PHP weather script, logic needs some cleaning up though.