diff -rup /home/mythtv/mythtv/myth_src/13238/mythplugins/mythweb/modules/weather/includes/objects/Forecast.php ./weather/includes/objects/Forecast.php
--- /home/mythtv/mythtv/myth_src/13238/mythplugins/mythweb/modules/weather/includes/objects/Forecast.php	2007-04-14 01:34:39.000000000 -0400
+++ ./weather/includes/objects/Forecast.php	2007-04-19 00:26:11.000000000 -0400
@@ -24,13 +24,13 @@ class Forecast {
     var $HighTemperature;
     var $LowTemperature;
 
-    function Forecast($date, $real_dayofweek) {
+    function Forecast($date, $i) {
+        
+        $month = substr($date,2,2);
+        $day   = substr($date,0,1);
+        $year  = substr($date,5,2);
 
-        $month = substr($date,0,2);
-        $day   = substr($date,3,2);
-        $year  = substr($date,6,4);
-
-        $temp_date         = mktime(0,0,0,$month,$day,$year);
+        $temp_date         = mktime(0,0,0,$month,$day,$year) + $i*3600*24;
         $date_time_array   = getdate( $temp_date );
         $claimed_dayofweek = $date_time_array['wday'];
 
diff -rup /home/mythtv/mythtv/myth_src/13238/mythplugins/mythweb/modules/weather/includes/objects/WeatherSite.php ./weather/includes/objects/WeatherSite.php
--- /home/mythtv/mythtv/myth_src/13238/mythplugins/mythweb/modules/weather/includes/objects/WeatherSite.php	2007-04-14 01:34:39.000000000 -0400
+++ ./weather/includes/objects/WeatherSite.php	2007-04-19 00:21:37.000000000 -0400
@@ -51,48 +51,57 @@ class WeatherSite {
         $this->RadarImage = $this->getRadarURL();
     }
 
+    function in($One,$Two,$data) {
+        $x = strpos($data,$One) + strlen($One);
+        $y = strpos($data,$Two);
+
+        if($x == false || $y == false) {
+           return "N/A";
+        }
+
+        $str = substr($data, $x, $y - $x);
+          return $str;
+    }
+
     function getData() {
         global $Weather_Types;
-        $data = file('http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=' . $this->acid);
+	$data=join('',file("http://xoap.weather.com/weather/local/".$this->acid."?cc=*&unit=F&dayf=5")); 
 
-        foreach($data as $line) {
-            if(strpos($line, 'this.sw') === false)
-                continue;
-            if(strpos($line, 'swTempCel') !== false)
-                continue;
-
-            $line = trim($line);
-            list($name, $value) = explode(' = "', $line);
-            $name  = substr($name, 7);
-            $value = substr($value, 0, strlen($value) - 2);
-
-            switch ($name) {
-                case 'City':    $this->city               = $value;             break;
-                case 'SubDiv':  $this->subdiv             = $value;             break;
-                case 'Country': $this->country            = $value;             break;
-                case 'Region':  $this->region             = $value;             break;
-                case 'Temp':    $this->Temperature        = $value;             break;
-                case 'CIcon':   $this->CIcon              = $value;             break;
-                case 'WindS':   $this->WindSpeed          = $value;             break;
-                case 'WindD':   $this->WindDirection      = $value;             break;
-                case 'Baro':    $this->BarometricPressure = $value;             break;
-                case 'Humid':   $this->Humidity           = $value;             break;
-                case 'Real':    $this->Real               = $value;             break;
-                case 'UV':      $this->UV                 = $value;             break;
-                case 'Vis':     $this->Visibility         = $value;             break;
-                case 'LastUp':  $this->LastUpdated        = $value;             break;
-                case 'ConText': $this->ConText            = $value;             break;
-                case 'Fore':    $this->Forecast = $this->readForecast($value);  break;
-                default:        /* Weird, unknown type */                       break;
-            }
-        }
+	$this->LastUpdated=$this->in("<lsup>","</lsup>",$data);
+	$dnaminfo = $this->in("<dnam>","</dnam>",$data);
+        $sep = strpos($dnaminfo, ','); 
+	if($sep != false) { 
+		$this->city = substr($dnaminfo, 0, $sep); 
+		$this->subdiv = substr($dnaminfo, $sep + 1, strlen($dnaminfo) - $sep - 1);
+                $this->country = " ";
+                $this->region = " "; 
+	} 
+	$this->Condition=$this->in("<t>","</t>",$data); 
+	$this->Temperature=$this->in("<tmp>","</tmp>",$data); 
+	$this->Real=$this->in("<flik>","</flik>",$data); 
+	$barinfo = $this->in("<bar>","</bar>",$data); 
+	$this->BarometricPressure=$this->in("<r>","</r>",$barinfo); 
+	$windinfo = $this->in("<wind>","</wind>",$data); 
+	$this->WindSpeed = $this->in("<s>","</s>",$windinfo); 
+	$this->WindDirection = $this->in("<t>","</t>",$windinfo); 
+	$this->Humidity = $this->in("<hmid>","</hmid>",$data); 
+	$this->Visibility = $this->Humidity; 
+	$this->Visibility = $this->in("<vis>","</vis>",$data); 
+	$uvinfo = $this->in("<uv>","</uv>",$data); 
+	$this->UV = $this->in("<i>","</i>",$uvinfo); 
+	$this->CIcon = $this->in("<icon>","</icon>", $data);
+	$condinfo = $this->in("<cc>","<bar>",$data); 
+	$this->ConText = $this->in("<t>","</t>",$condinfo);
+        $this->Forecast = $this->readForecast($data); 
 
     //Are we using metric or imperial system
         if ($this->use_metric == 'YES') {
             $this->Temperature        = round((5/9) * ($this->Temperature - 32));
             $this->Real               = round((5/9) * ($this->Real - 32));
             $this->BarometricPressure = round($this->BarometricPressure * 2.54);
+        if (strpos($this-Visibility, 'Unlimited') == false) {
             $this->Visibility         = round($this->Visibility * 1.609344);
+        }
             $this->WindSpeed          = round($this->WindSpeed * 1.609344);
         }
 
@@ -139,26 +148,28 @@ class WeatherSite {
         global $Weather_Types;
         $ret = array();
 
-        $data = explode('|', $data);
         for($i = 0;$i<5;$i++) {
         // mktime uses 0-6;  msnbc gives us 1-7;  adjust msnbc to match mktime
-            $dayofweek = $data[$i] - 1;
-            $forecast = new Forecast($data[5 + $i],$dayofweek);
-            $forecast->dayofweek = $dayofweek;
-            list($forecast->DescImage,$forecast->DescText) = $Weather_Types[$data[15 + $i]];
-            $forecast->DescImage = (strlen($forecast->DescImage) > 0) ? $forecast->DescImage : 'unknown.png';
-            $forecast->DescText  = (strlen($forecast->DescText)  > 0) ? $forecast->DescText  : t('Unknown') . ' (' . $data[15+$i] . ')';
+            $data1 = $this->in("<day d=\"".$i,"</day>",$data);
+            $forecast = new Forecast($this->LastUp,$i);
+            $forecast->dayofweek = $i;
+           
+            $fc = $this->in("<part p=\"d","</part>",$data1); 
+            $forecast->DescText = $this->in("<t>","</t>",$fc);
+            $forecast->DescImage = 'unknown.png'; 
+
+//            list($forecast->DescImage,$forecast->DescText) = $Weather_Types[$data[15 + $i]];
+            $forecast->HighTemperature = $this->in("<hi>","</hi>",$data1);
+            $forecast->LowTemperature = $this->in("<low>","</low>",$data1); 
+
             if($this->use_metric == 'YES') {
-                $forecast->HighTemperature = round((5/9) * ($data[20 + $i] - 32));
-                $forecast->LowTemperature = round((5/9) * ($data[40 + $i] -32 ));
-            } else {
-            $forecast->HighTemperature = $data[20 + $i];
-            $forecast->LowTemperature = $data[40 + $i];
-            }
+                $forecast->HighTemperature = round((5/9) * ($forecast->HighTemperature - 32));
+                $forecast->LowTemperature = round((5/9) * ($forecast->LowTemperature -32 ));
+            } 
 
             $ret[$i] = $forecast;
         }
 
         return $ret;
     }
