(.*)|', $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.

Astronomy Information


Sun

Moon

Sun Moon age: 4 days,14 hours,51 minutes,22%
Sunrise: 7:27 AM
Sunset: 5:48 PM
Daylight: 10:21
Moonrise: 10:02 AM
Moonset: 10:19 PM
22% illuminated


First Quarter Moon Full Moon Last Quarter Moon New Moon
First Quarter Moon Full Moon Last Quarter Moon New Moon
04:10 UTC 31 January 2012 21:54 UTC 7 February 2012 17:04 UTC 14 February 2012 22:35 UTC 21 February 2012