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.
- <?php
-
$xmlDoc = new DOMDocument();
-
$xmlDoc->load("http://weather.yahooapis.com/forecastrss?p=SNXX0006&u=f");
-
-
print $xmlDoc->saveXML();
-
?>
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