(.*)|', $html, $headers); $warnheaders = $headers[1]; //Get the advisory text and put them into an array as well preg_match_all('|
(.*)
|Uis', $html, $headers); $warntext = $headers[1]; //If there is more than one advisory, we need to set its priority if (count($warnheaders) >= 1) { $i = 0; $flag = 0; //First, around here tornados are the biggest danger. A warning is critical information. //Display this one first no matter what! while ($i < count($warnheaders)): if (preg_match("/Tornado Warning/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; //Next if there are none of the above found. Display the first warning message. if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Warning/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if there are none of the above found. Display the first watch message. if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Watch/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if there are none of the above found. Display the first advisory message. if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Advisory/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if there are none of the above found. Display the first statement message. if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Statement/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if none of the above is found Check for air quality alert if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Air Quality Alert/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if none of the above is found check for Hazardous Weather Outlook if ($flag == 0) { $i = 0; while ($i < count($warnheaders)): if (preg_match("/Hazardous Weather Outlook/i", $warnheaders[$i])) { $targetwarn = $warnheaders[$i]; $targettext = $warntext[$i]; $targettext = explode("$$",$targettext); $flag = 1; break; } $i++; endwhile; } //Next if there are none of the above found. Set the advisory to default message. if ($targetwarn == "No Active Hazardous Weather Conditions Found") { $targetwarn = "NO CURRENT ADVISORIES"; $targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR THE HIGH SHOALS AREA"; } else if (empty($targetwarn)) { $targetwarn = "NO CURRENT ADVISORIES"; $targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR THE HIGH SHOALS AREA"; } else if ($targetwarn == "Short Term Forecast") { $targetwarn = "NO CURRENT ADVISORIES"; $targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR THE HIGH SHOALS AREA"; } if ($targetwarn <> "NO CURRENT ADVISORIES") { $warnlist = 'ALL CURRENT ADVISORIES:'; for ($i = 0; $i <= count($warnheaders); $i++) { $warnheaderplus = preg_replace( '| |', '+', $warnheaders[$i] ); $warnlist = $warnlist . '
' . $warnheaders[$i] . ''; } } } ?>
Welcome to Weather Nut Haven.com
01/27/12 9:04 PM
   Calm\clear
45° F Feels Like 45°
Temp Rate tempchangelasthourfaren% °F
Humidity 68%
Barometer 29.99 in.
Dew Point 35.1°F
Wind 0.0 mph   S
Rain Today 0.00 in.

Trends as of 01/27/12 9:04 PM

TIME TEMP WIND SPD WIND GUST WIND DIR HUMIDITY PRESSURE RAIN
Current 45.0 °F 0.0 0.0 S 68% 29.992 0.00
5 minutes ago 45.5 °F 0.0 2.3 S 67% 29.990 0.00
10 minutes ago 46.2 °F 0.0 0.0 S 66% 29.993 0.00
15 minutes ago 46.7 °F 1.2 0.0 S 63% 29.991 0.00
20 minutes ago 47.1 °F 0.0 0.0 ENE 62% 29.987 0.00
30 minutes ago 47.9 °F 0.0 2.3 ENE 61% 29.991 0.00
45 minutes ago 48.6 °F 3.5 3.5 WNW 60% 29.981 0.00
60 minutes ago 49.1 °F 2.3 3.5 N 58% 29.976 0.00
75 minutes ago 49.5 °F 1.2 3.5 NW 57% 29.977 0.00
90 minutes ago 49.7 °F 3.5 5.8 WNW 57% 29.972 0.00
105 minutes ago 50.1 °F 2.3 3.5 NW 56% 29.961 0.00
120 minutes ago 50.6 °F 1.2 2.3 NW 54% 29.951 0.00

Records and Stats

RAIN RAIN HISTORY
Today 0.00 in. (0.00 last hour) Today 0 days since last rain on 1/26/2012 at 10:45 PM
Yest. 0.09 in. Week 0.972 in. over last 7 days.
Month 2.16 in. (9 days with rain this month) Month 2.10 last month.
Year 2.16 in. (9 days with rain this year) Year 1.48 total last year at this time.
TEMPERATURE HIGHS HOT DAYS THIS MONTH
Today 64.8°F at 1:35 AM Max > 86 °F 0 day(s)
High 1 Yr ago 50.3 °F
Yest. 63.0 °F at 11:59 PM Max > 77 °F 0 day(s)
Month 70.5 °F on 1/7/2012 Warmest day 60.0°F on: Jan 27 2012
Year 70.5 °F on 1/7/2012 Warmest night 61.4°F on: Jan 27 2012
Normal High 48.2°F Record High 71.6°F in 1954
TEMPERATURE LOWS COLD DAYS THIS MONTH
Today 45.0°F at 9:03 PM Min < 32 °F 13 day(s)
Low 1 yr ago 25.3 °F
Yest. 44.1 °F at 12:34 AM Min < 5 °F 0 day(s)
Month 14.7 °F on 1/4/2012 Coldest day 39.0°F on: Jan 22 2012
Year 14.7 °F on 1/4/2012 Coldest night 14.5°F on: Jan 17 2009
Normal Low 26.6°F Record Low 8.6°F in 1982
BAROMETER HIGHS WIND CHILL LOWS
Today 29.993 in. at 8:52 PM Today 45.0 °F at 9:03 PM
Yest. 30.163 in. at 12:10 AM Yest. 44.1 °F at 12:34 AM
Month 30.534 in. on 1/16/2012 Month 14.5 °F on 1/3/2012
Year 30.534 in. on 1/16/2012 Year 14.5 °F on 1/3/2012
BAROMETER LOWS HEAT INDEX HIGHS
Today 29.585 in. at 5:08 AM Today 64.8 °F at 1:35 AM
Yest. 29.664 in. at 11:59 PM Yest. 63.0 °F at 11:59 PM
Month 29.477 in. on 1/11/2012 Month 77.4 °F on 1/7/2012
Year 29.477 in. on 1/11/2012 Year 77.4 °F on 1/7/2012

Wind Data

CURRENT Wind direction plot
Now 0.0 mph S
Gust 0.0 mph S
Gust/hr 6.0 mph NNW
WIND GUST HIGHS
Today 34.0 mph SSW at 1:19 AM
Yest. 20.0 mph SSW at 11:43 PM
Month 42.6 mph on 1/12/2012
Year 42.6 mph on 1/12/2012
WIND GUST AVERAGE HIGHS
Today 17.9 mph S at 1:16 AM
Yest. 11.2 mph SSW at 11:54 PM
Month 21.9 mph on 1/12/2012
Year 21.9 mph on 1/12/2012
WIND CHILL LOWS
Today 45.0 °F at 9:03 PM
Yest. 44.1 °F at 12:34 AM
Month 14.5 °F on 1/3/2012
Year 14.5 °F on 1/3/2012
WIND RUN
Today 99.17 miles
Month 316.96 miles
Year 316.96 miles