RE: Using PHPWeather question
Brought to you by:
iridium
From: Max H. <ma...@fl...> - 2004-02-08 19:20:54
|
Jenni, almost there. <?php require('phpweather.php'); $weather = new phpweather(); $weather->set_icao("KOMA"); $foo = $weather->decode_metar(); $temp_c = $foo['temperature']['temp_c']; $temp_f = $foo['temperature']['temp_f']; echo "<p>The temperature is $temp_c degrees Celsius ($temp_f degrees Fahrenheit).</p>"; ?> If this script isn't in the same place as the phpweather install, you'll need to modify the first line accordingly. Incidentally, we're all busy people doing other things, so don't be suprised if a reply takes a day or two. Cheers, Max > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of > Daisyhead > Sent: 08 February 2004 18:23 > To: php...@li... > Subject: Re: Using PHPWeather question > > > A couple of clarifications. I'm using v2.21 of PHPWeather and cannot find > what code I need to place in my blog to pull the weather info in. > > This is my second request for h*lp. Can someone please respond? > > Thanks, > Jenni > > > ----- Original Message ----- > From: "Jenni" <je...@da...> > To: <php...@li...> > Sent: Saturday, February 07, 2004 11:55 AM > Subject: Using PHPWeather question > > > > I have installed and configured PHPWeather, but am having problems > actually > > getting it to work on my blog. I am fairly new to PHP and > MySQL, although > > I've been able to teach myself enough to figure most things out. But for > > some reason I cannot figure out how to call the weather information into > my > > blog. I tried using: > > > > <?php > > include('phpweather.inc'); > > include('locale_en.inc'); > > $metar = get_metar('KOMA'); > > $data = process_metar($metar); > > $temp_c = $data['temp_c']; > > $temp_f = $data['temp_f']; > > echo "<p>The temperature is $temp_c degrees Celsius ($temp_f degrees > > Fahrenheit).</p>"; > > ?> > > > > I cannot see where I have a filed named "phpweather.inc" or > "locale_en.inc" > > Can anyone clue me in as to what I did wrong? The documentation > isn't very > > user friendly for us newbies. ;-) > > > > Thanks, > > Jenni > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > |