weather display automatically

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
firestar_lene
Forum Newbie
Posts: 10
Joined: Mon Mar 29, 2004 2:04 am

weather display automatically

Post by firestar_lene »

i want my webpage to display weather automatically from any particular website that provides weather information using php codes.

how to write the php coding?
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

odds are they will have some code, might be php or might be a html link that you can use. Check it out, otherwise you will need their permission to access their weather data.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Don't steal content without permission - free weather feeds are few and far between. Most will offer a feed (CSV, XML or similar) that you can use so you don't have to take the information directly from the webpages that they use.

Mac
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Preety sure weather.com offers a feed that you can use as long as you sign up - used to be free, dont know if it still is.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Yup, weather.com has a XML feed, you dont even have to sign up to use it :P

first, goto http://xoap.weather.com/search/search?where=XXXXX (change XXXX# to whatever you want weather for; zip code, city, state, or country, etc.)
second, copy the "loc id" from the search results and paste it where YYYYYY is in this url: http://xoap.weather.com/weather/local/YYYYYY
Post Reply