FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » getting only the temperature & general weather condition
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: getting only the temperature & general weather condition [message #173821 is a reply to message #173816] Sat, 07 May 2011 10:17 Go to previous messageGo to previous message
Evolution is currently offline  Evolution
Messages: 14
Registered: April 2011
Karma:
Junior Member
On May 6, 7:24 pm, MacRoks <macr...@aim.com> wrote:
> On 2011-05-06 18:22:33 -0400, Evolution said:
>
>
>
>
>
>> On phpbuilder.com,  I found the following:
>
>>   http://www.phpbuilder.com/board/showthread.php?t=10283087
>
>> which discusses how to obtain the current weather for a feed closest
>> to you.
>
>> I modified the code to my site but didn't get the same results as
>> shown by Kudose (a poster at the bottom of that same page).
>
>> My code is:
>> <?
>> session_register();
>> session_start();
>> $url = 'http://www.nws.noaa.gov/data/current_obs/KSBA.xml';
>> $xml = simplexml_load_file($url);
>
>> echo '<b>Santa Barbara weather: </b><br />';
>> echo $xml->weather, '<br />';
>> echo $xml->temperature_string, '<br />';
>> echo $xml->relative_humidity, '% humidity <br />';
>> ?>
>
>> and the impaired results are on a test page at:
>
>>   http://www.geol.ucsb.edu/library/php/weather.php
>
>> Can anybody point me in the right direction?  I'm essentially a
>> newbie.
>> Thanks!
>
> What version of PHP do you have?

5.2.12-pl0-gentoo

> --
> MacRoks
> ---------------------------
> Kindle 3 Wifi+3G
> MacBook
> iPod Touch 3G 64 GB
> HP Palm Pre
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: evaluating a null value in an array
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 09 23:53:57 GMT 2024

Total time taken to generate the page: 0.04903 seconds