Thread: PHPWeather 2.1.2
Brought to you by:
iridium
From: Pedro L. <li...@le...> - 2003-04-25 17:04:08
|
I don't know if this list is active or not, but here goes... I've been using phpweather for a while, actually version 1.62. I'm now playing with version 2.1.2 using MySQL. I'm not very familiar with php, but I was able to get version 1.62 working. I actually found some examples, so that made it easier. I used to run this from a php page; <?php include('weather/images.inc'); include('weather/locale_en.inc'); include('weather/phpweather.inc'); $metar = get_metar('KEWR'); $decoded_metar = process_metar($metar); $data = process_metar($metar); $temp = $data['temp_f']; $minutes_old = round((time() - $data['time'])/60); ?> Then print out the results; <?php get_sky_image($decoded_metar) ?> <?php echo "$data[cloud_layer1_condition]";?> <?php get_temp_image($decoded_metar) ?> <?php echo "$temp°F"; ?> <?php echo "$data[temp_c]°C";?> <?php echo "$data[rel_humidity]%";?> <?php echo "$data[visibility_miles] miles";?> <?php echo "$data[wind_miles_per_hour] mph from $data[wind_dir_text]";?> <?php echo "$data[windchill_f]°F";?> <?php echo "$minutes_old";?> I noticed that some variables and array names have changed, and possibly the way to call them. I've got a couple of things working like temperature and wind speed, but what I'm looking for is the same results I used to get. I used <?php print_r($data); ?> to display all the data in this array, but what I'm really looking for is a way to print out each detail in the METAR seperately, like I used to do. Thanks in advance, -Pedro |
From: Pedro L. <li...@le...> - 2003-04-25 22:33:27
|
Ohh, one more thing.. the other problem I'm seeing is that data will not update. I have built a page that displays the paragraph form of the weather data, but that will go stale, even reporting that the last update was done 8 hours ago: http://www.stpatrickhighschool.org/weather/ -Pedro On Fri, Apr 25, 2003 at 01:03:55PM -0400, Pedro Leitao wrote: > > I don't know if this list is active or not, but here goes... > I've been using phpweather for a while, actually version 1.62. > I'm now playing with version 2.1.2 using MySQL. I'm not very > familiar with php, but I was able to get version 1.62 working. > I actually found some examples, so that made it easier. > I used to run this from a php page; > <?php > include('weather/images.inc'); > include('weather/locale_en.inc'); > include('weather/phpweather.inc'); > $metar = get_metar('KEWR'); > $decoded_metar = process_metar($metar); > $data = process_metar($metar); > $temp = $data['temp_f']; > $minutes_old = round((time() - $data['time'])/60); > ?> > > Then print out the results; > <?php get_sky_image($decoded_metar) ?> > <?php echo "$data[cloud_layer1_condition]";?> > <?php get_temp_image($decoded_metar) ?> > <?php echo "$temp°F"; ?> > <?php echo "$data[temp_c]°C";?> > <?php echo "$data[rel_humidity]%";?> > <?php echo "$data[visibility_miles] miles";?> > <?php echo "$data[wind_miles_per_hour] mph from $data[wind_dir_text]";?> > <?php echo "$data[windchill_f]°F";?> > <?php echo "$minutes_old";?> > > I noticed that some variables and array names have changed, and possibly > the way to call them. I've got a couple of things working like temperature > and wind speed, but what I'm looking for is the same results I used to get. > I used <?php print_r($data); ?> to display all the data in this array, but > what I'm really looking for is a way to print out each detail in the METAR > seperately, like I used to do. > > Thanks in advance, > -Pedro > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Martin G. <gim...@gi...> - 2003-04-30 22:35:51
|
Pedro Leitao <li...@le...> writes: > Ohh, one more thing.. the other problem I'm seeing is that data will > not update. I have built a page that displays the paragraph form of > the weather data, but that will go stale, even reporting that the > last update was done 8 hours ago: > http://www.stpatrickhighschool.org/weather/ Sorry about the long responce time --- the list isn't dead, but it's sometimes close... I've had some problems with my DNS server lately and therefore I haven't checked my mail. Back to your problem --- I've just checked your page and it says 'As of 37 minutes ago'. Does that mean that it works now, or was I just lucky? I give a quick recap of how to use PhpWeather in this mail, if you haven't already seen this mail, then perhaps you'll find it useful: http://makeashorterlink.com/?E16D42664 -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Pedro L. <li...@le...> - 2003-05-12 15:09:10
|
Hi Martin, and everyone else: I'm sorry, I've gotten lazy about reading my mailing lists lately. I actually went back to version 1.62 since I couldn't get version 2 working right for me. I'll take a look at your write up and if I still have problems I'll be patient and post them here. Thanks for your help, I really like this app :) -Pedro On Thu, May 01, 2003 at 12:35:26AM +0200, Martin Geisler wrote: > Pedro Leitao <li...@le...> writes: > > > Ohh, one more thing.. the other problem I'm seeing is that data will > > not update. I have built a page that displays the paragraph form of > > the weather data, but that will go stale, even reporting that the > > last update was done 8 hours ago: > > http://www.stpatrickhighschool.org/weather/ > > Sorry about the long responce time --- the list isn't dead, but it's > sometimes close... I've had some problems with my DNS server lately > and therefore I haven't checked my mail. > > Back to your problem --- I've just checked your page and it says 'As > of 37 minutes ago'. Does that mean that it works now, or was I just > lucky? > > I give a quick recap of how to use PhpWeather in this mail, if you > haven't already seen this mail, then perhaps you'll find it useful: > > http://makeashorterlink.com/?E16D42664 > > -- > Martin Geisler My GnuPG Key: 0xF7F6B57B > > See http://gimpster.com/ and http://phpweather.net/ for: > PHP Weather: Shows the current weather on your webpage and > PHP Shell: A telnet-connection (almost :-) in a PHP page. > Join Freenet: http://gimpster.com/downloads/freenet/ > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |