473,471 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

weather information in web site

52 New Member
Dear Sir,
i need to add weather information in my web site.
how can i do this using php?
please try to inform to me.

Regards,
faruk chowdhury
Jan 18 '09 #1
10 3157
Atli
5,058 Recognized Expert Expert
Hi.

Well, to start with, you would have to find a place to get that weather information from. Do you know such a place?
Jan 18 '09 #2
farukcse
52 New Member
@Atli
i don't know.
can u send me plz?
Jan 18 '09 #3
Atli
5,058 Recognized Expert Expert
Send you what?
I have no weather information.

You are going to have to find a data source if you want to display it on your web.
Jan 18 '09 #4
farukcse
52 New Member
@Atli
i need php code or php classe by which i can show the current temperature for local city/country in my site.
Jan 18 '09 #5
Atli
5,058 Recognized Expert Expert
Yes, I gathered as much.

But the first thing you are going to need is a data source, a place where you can get the current weather data. No PHP code can simply manufacture this data. It has to come from somewhere.

Until you know where that is coming from, there is little point even discussing the actual PHP code.

Don't expect us to simply hand over a ready-to-use code example.
We are always happy to help out if your having problems with your code, but this is your project. You are going to have to do the heavy lifting.
Jan 18 '09 #6
dlite922
1,584 Recognized Expert Top Contributor
@Atli
I'm with you but a little googling goes along way, (no heavy lifting needed)

whether reliable or not, I don't know but if you google("Weather API PHP") you'll get some good results.



Cheers,



Dan
Jan 19 '09 #7
Atli
5,058 Recognized Expert Expert
@dlite922
True, but I do expect people to at least try to do their own work (including researching solutions).

I actually did Google this myself, using the keywords: "weather feed", and the top 10 results would probably all have worked in this case.
Jan 19 '09 #8
ak1dnar
1,584 Recognized Expert Top Contributor
There are so many free web services which gives the weather information. Google for "weather web services". Then Create the consumer application to read the web service.
Jan 19 '09 #9
farukcse
52 New Member
@dlite922

Thanx for your cooperation and support...
Jan 19 '09 #10
sunman
1 New Member
Dear Fri,

I was the same problem with you. But I found the solution. Your post was very old. now I reply for next person.

You can use the free RSS information from Yahoo. Please see following information. This is a sample of RSS feed using XML Parser.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $xmlDoc = new DOMDocument();
  3. $xmlDoc->load("http://weather.yahooapis.com/forecastrss?p=SNXX0006&u=f");
  4.  
  5. print $xmlDoc->saveXML();
  6. ?>
Please see the full information in http://developer.yahoo.com/weather/#req. In this example, you can use (p) for (location) and (u) for (units for temperature). For location code, you can search in http://weather.yahoo.com . For example, In the [Browse for U.S. and International Forecasts] section, click asia > singapore > singapore. Finally, yahoo will show you http://weather.yahoo.com/Singapore-S.../forecast.html. In this page, SNXX0006 for the location of singapore. For another xml with php information, you can learn in http://www.w3schools.com/php/php_xml_parser_expat.asp.

Important Note...
In XML RSS feed, you must think the link ( http://weather.yahooapis.com/forecastrss?p=SNXX0006&u=f ) to an XML file.


Best, Nay La Aung
Aug 17 '09 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: VNN | last post by:
I'm working on a project to get weather info for my company and would like to know if there's any good weather web services site I can subscribe to? Current temperature, 12-hour temperature...
9
by: Boki | last post by:
Hi All, I am going to create a personal weather board. It is easy to show the picutre on website ( just link the picture to picturesbox's properties ) but I dont' know how to add some other...
1
by: pmclinn | last post by:
I have the xml feed belowfrom this link: http://www.weather.gov/alerts/ct.rss I for the life of me can not get this data to format in a html table using client side scripting. Any help would be...
2
by: JayCally | last post by:
I want to add the current weather conditions in my area to my site. I've looked at some of the sites that will give you a generated script to add to your site but I don't like the way they look. I...
1
by: nagabhargavi | last post by:
Hi, Can any one tell me how to display weather of a city enetred using text box in my web site using php like as in weather.com.
2
by: sandeep patil | last post by:
how to diplay the weather condiction on my webpage suppose i want to read weather from www.bbc.co.uk/weather.html how i can read it usin program
4
by: shaynenash | last post by:
I wrote this script to calculate if water restrictions were in place if it was hotter than 25deg C. It has turned out to be a pretty good weather widget that can be used elsewhere. This was initially...
2
by: Craig M | last post by:
Our current intranet site displays the weather with a 7 day forecast. We have to manually enter all the weather info into a SQL DB using a web front end, but would like to use an RSS feed. All...
0
by: bharathreddy | last post by:
This article will explain you how to check weather a column already exists in a table before you add the column to the table using alter command. Using the system tables...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.