2 include("xml2array.php");
6 curl_setopt($ch, CURLOPT_URL,"http://weather/weather/all-output.xml");
8 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
9 curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
10 curl_setopt($ch, CURLOPT_USERPWD, 'admin:admin');
12 $output = curl_exec($ch);
15 $array=xml2array($output);
20 <tr align='center' style='background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1E5799), color-stop(50%,#2989D8), color-stop(51%,#207cca), color-stop(100%,#7db9e8));background: -moz-linear-gradient(top, #1E5799 0%, #2989D8 50%, #207cca 51%, #7db9e8 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1E5799', endColorstr='#7db9e8',GradientType=0 );'><td>Temperature</td><td>Wind</td><td>Rain</td><td>Wind Chill</td></tr>
21 <tr align='center'><td rowspan=3 align=center>
23 echo $array['rss']['weather']['outsideTemp']." °F<br>";
24 $temp=$array['rss']['weather']['outsideTemp'];
25 $mint=$array['rss']['weather']['lowOutsideTemp'];
26 $maxt=$array['rss']['weather']['hiOutsideTemp'];
27 echo "<table border=0>";
28 echo "<tr align=center><td>";
29 echo "<img src='thermometer.php?t=$temp&mint=$mint&maxt=$maxt'>";
30 echo "</td><td> Feels like<br>".$array['rss']['weather']['windchill']." °F<br>";
31 echo "</td></tr></table>";
32 echo "<table border=0>";
33 echo "<tr align=center style='background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1E5799), color-stop(50%,#2989D8), color-stop(51%,#207cca), color-stop(100%,#7db9e8));background: -moz-linear-gradient(top, #1E5799 0%, #2989D8 50%, #207cca 51%, #7db9e8 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1E5799', endColorstr='#7db9e8',GradientType=0 );'><td>Temp</td><td>High</td><td>Low</td></tr>";
34 echo "<tr align=center><td rowspan=2>Today:</td><td>$maxt °F</td><td>$mint °F</td></tr>";
35 echo "<tr align=center><td>".$array['rss']['weather']['hiOutsideTempTime']."</td><td>".$array['rss']['weather']['lowOutsideTempTime']."</td></tr>";
42 echo $array['rss']['weather']['winddirection']."<br>";
43 echo $array['rss']['weather']['windspeed']." MPH<br>";
44 echo $array['rss']['weather']['windBeaufortScale']."<br>";
45 echo "Max wind ".$array['rss']['weather']['hiWindSpeed']." MPH at ".$array['rss']['weather']['hiWindSpeedTime'];
51 echo "<tr align=center><td>Today:</td><td>".$array['rss']['weather']['dailyRain']."</td></tr>";
52 echo "<tr align=center><td>Rate (/hr):</td><td>".$array['rss']['weather']['rainrate']."</td></tr>";
53 echo "<tr align=center><td>High Rate:</td><td>".$array['rss']['weather']['hiRainRate']."</td></tr>";
54 echo "<tr align=center><td>Month Total:</td><td>".$array['rss']['weather']['monthlyRain']."</td></tr>";
55 echo "<tr align=center><td>Rain Season:</td><td>".$array['rss']['weather']['totalRain']."</td></tr>";
61 echo "<tr align=center><td>Current:</td><td>".$array['rss']['weather']['windchill']." °F</td></tr>";
62 echo "<tr align=center><td>Low:</td><td>".$array['rss']['weather']['lowWindchill']." °F<br>at ".$array['rss']['weather']['lowWindchillTime']."</td></tr>";
66 <tr align='center'><td style='background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1E5799), color-stop(50%,#2989D8), color-stop(51%,#207cca), color-stop(100%,#7db9e8));background: -moz-linear-gradient(top, #1E5799 0%, #2989D8 50%, #207cca 51%, #7db9e8 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1E5799', endColorstr='#7db9e8',GradientType=0 );'>Barometer</td><td style='background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1E5799), color-stop(50%,#2989D8), color-stop(51%,#207cca), color-stop(100%,#7db9e8));background: -moz-linear-gradient(top, #1E5799 0%, #2989D8 50%, #207cca 51%, #7db9e8 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1E5799', endColorstr='#7db9e8',GradientType=0 );'>Humidity/Dew Point</td><td></td>
67 <tr align='center'><td>
70 echo "<tr align=center><td>Current:</td><td>".$array['rss']['weather']['barometer']." inHg</td></tr>";
71 echo "<tr align=center><td>1-Hr Trend:</td><td>".$array['rss']['weather']['baromtrend']."</td></tr>";
77 echo "<tr align=center><td>Humidity:</td><td>".$array['rss']['weather']['outsideHumidity']." %</td></tr>";
78 echo "<tr align=center><td>Today:</td><td>H: ".$array['rss']['weather']['hiHumidity']."%<br>L: ".$array['rss']['weather']['lowHumidity']."%</td></tr>";
79 echo "<tr align=center><td>Dew Point:</td><td>".$array['rss']['weather']['outsideDewPt']." °F</td></tr>";
87 include("weather-footer.php");