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
|