MeAmRussian
02-17-2006, 11:28 PM
I need a local weather script (like weather.com's) that automatically shows the weather by looking at where the person is from by looking at his/her IP address. NOT a script that asks you to put in a city beforehand or asks you to input a city or zip code. If it asks you to enter an IP address, that will be ok, but I prefer it to automatically display the weather.
Can someone help me find this?
Thanks.
PSAMaster
02-18-2006, 12:51 AM
When you find that, let me know. I have a site that I really want to use that on
dexxtreme
02-18-2006, 02:02 AM
The first thing that you would probably need would be something like GeoIP (http://www.maxmind.com/app/city) so that you can have an IP -> City database. Of course, the license for this version is not free, nor are the monthly updates. (The free version only has a resolution down to the country.) Once you have that then you will need to find a weather service that will either 1) allow you to link to a premade weather image (such as Weather Underground (http://www.wunderground.com/about/faq/weathersticker.asp)), 2) allow you to use some php script that parses a weather site like noaa.gov or weather.com (sending excessive amounts of requests could possibly get your site blocked or they may force you to pay for access), or 3) allow you to access *all* their RSS feeds (which may not be free since there are hundreds of cities that have feeds that are updated hourly or so). Once you have that set up, you will probably need to write a script from scratch that can tie all of that together.
This is probably why it is so hard to find one pre-made.
MeAmRussian
02-18-2006, 08:08 PM
^^^^
Wow... you're right about all of that. Then maybe I could just find one that asks for the city of zip code, but make a cookie that remembers the answer each time so the person doesn't have to click on anything?
Hehe, thanks.