Change time and weather according to place

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
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Change time and weather according to place

Post by amir »

Hello,

I am working on a site in which I have to display time and weather according to Canadian cities. For example, if I select Toronto in the navigation, it 'll display time and weather of Toronto and if I select Victoria from the navigation, it 'll display time and weather of Victoria and similarly for all cities.

Thanks in Advance,
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

And?
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

And?
This means you want some more details?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

amir wrote:This means you want some more details?
You didn't ask a question.
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

Say you have a list of cities in your site in left navigation. e.g.

Toronto
Victoria
and so on...

I want to have time and weather of Toronto to be displayed if the user clicks Toronto from the navigation and if the user clicks Victoria, it should display time and weather of Victoria and so on for all cities. Sure, these would be live/current/latest/updated daily.

Hope, it 'll give idea...

Thanks,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

No question still.
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

How to display Time and Weather of Canadian cities on my website?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Pull in an RSS feed from some weather service in the region?
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

I 'll have to use RSS for both Time and Weather?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Maybe he wants some code with an installer script?

Wow, we're sooooo dense! :twisted:

Seriously though: look on weather sites - most have some sort of drop-in-place code that will add a badge to your site.

Cheers,
Kieran
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

amir wrote:I 'll have to use RSS for both Time and Weather?
Weather is often time sensitive so many will provide a timestamp that the information is valid for.

If you don't want to get RSS feeds you will have to source the information from some service somewhere. Whether it's tapping into the weather stations directly or some other party or what, is up to you.
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

Thanks all! Cheers. :)
Wade
Forum Commoner
Posts: 41
Joined: Mon Dec 18, 2006 10:21 am
Location: Calgary, AB, Canada

Post by Wade »

Try here for the weather script:
http://www.cruelacid.com/?page=weather
Post Reply