################Change the Following
$location="Frontier Estates, Tallahassee, FL";
$statusfile = '/var/www/html/weather/log/weathermachine.status';
###Imperial Should be Yes or No
$imperial="Yes";
/*
$info{windgustdir} = shift;
$info{windgustspeed} = shift;
$info{windavgspeed} = shift;
$info{windchill} = shift;
$info{rainrate} = shift;
$info{raintotal} = shift;
$info{rainyesterday} = shift;
$info{indoortemp} = shift;
$info{indoorhumidity} = shift;
$info{indoordewpoint} = shift;
$info{outdoortemp} = shift;
$info{outdoorhumidity} = shift;
$info{outdoordewpoint} = shift;
$info{baro} = shift;
$info{barosea} = shift;
*/
############### Do Not change below this line
$date=date("F j, Y, g:i a");
?>
Teuse.net - Current Weather Conditions
Current Weather Conditions
print "$location\n";?>
print $date ?>
$handle=fopen("$statusfile","r");
$i=0;
while($line=fgets($handle,4096)){
$line=trim($line);
list($statusdate,$wind_dir,$wind_gust,$wind_avrg,$wind_chill,$rain_curr,$rain_total,$rain_yesterday,$in_temp,$in_hum,$in_dew,$out_temp,$out_hum,$out_dew,$press,$press_sea,$w_status_txt,$reset_year,$reset_month,$reset_day)=split(" ",$line);
}
fclose($handle);
if($imperial == "Yes"){
$units_temp="F";
$units_wind="mph";
$units_rain="in";
$units_pres="mbar";
$in_temp =round($in_temp*1.8+32,1);
$out_temp =round($out_temp*1.8+32,1);
$in_dew =round($in_dew*1.8+32,1);
$out_dew =round($out_dew*1.8+32,1);
$rain_curr = round($rain_curr/25.4,1);
$rain_yesterday = round($rain_yesterday/25.4,1);
$rain_total = round($rain_total/25.4,1);
$wind_avrg = round($wind_avrg*12000/5280);
$wind_gust=round($wind_gust*12000/5280);
$wind_chill=round($wind_chill*1.8+32,1);
}
else{
$units_temp="C";
$units_wind="m/s";
$units_rain="mm";
$units_pres="hpa";
}
list($sec, $min, $hour, $mday, $mon, $year) = localtime($rain_startdate);
$year += 1900;
$months = array("Jan ","Feb ","Mar ","Apr ","May ","Jun ","Jul ","Aug ","Sep ","Oct ","Nov ","Dec ");
$reset_month=$reset_month-1;
$rain_startdate="$months[$reset_month] $reset_day $reset_year";
if (($wind_dir > 67) && ($wind_dir <= 112)) {$wind_compass = "E";}
elseif (($wind_dir > 112) && ($wind_dir <= 247))
{
$wind_compass = "S";
if ($wind_dir <= 157) { $wind_compass .= "E";}
elseif ($wind_dir > 202) { $wind_compass .= "W";};
}
elseif (($wind_dir > 247) && ($wind_dir <= 292)) { $wind_compass .= "W";}
else
{
$wind_compass = "N";;
if (($wind_dir > 22) && ($wind_dir <= 67)) { $wind_compass .= "E";}
elseif (($wind_dir < 338) && ($wind_dir > 292)) { $wind_compass .= "W";};
}
?>
| Outdoor Temperature and Dewpoint |
| Outdoor Temperature: |
|
 |
| Outdoor Dewpoint: |
|
| Indoor Temperature and Dewpoints |
| Indoor Temperature: |
|
 |
| Inside Dew Point: |
|
| Relative Humidity |
| Outside Humidity: |
|
 |
| Inside Humidity: |
|
| Barometric Pressure |
| Relative Pressure: |
|
 |
| Forecast: |
.gif> print "$w_status_txt"; ?> |
| Wind |
| Wind Speed: |
|
 |
| Wind Gusts: |
|
| Wind Direction: |
|
 |
| Wind Chill: |
|
 |
| Rainfall |
| Current: |
|
 |
| Yesterday: |
|
| Since print "$rain_startdate";?> |
|
 |
About
if(file_exists("footer.php")){
include("footer.php");
}
else {
include ("/home/www/php/footer.php");
} ?>