OK, here is my mobile.php with the highlighted lines I had to change:
==============================
<?php
setcookie("DWCmobile", "Been There", time()+3600);
?><!-- ///////////////// START CALL PHP DATA FOR CURRENT CONDITIONS ///////////// -->
<?php
include("./wd/testtags.php");
?><!-- ///////////////// END CALL PHP DATA FOR CURRENT CONDITIONS ///////////// -->
<!-- ///////////////// START 7 DAY FORECAST SCRIPT ///////////// -->
<?php
/*------------------------------------------------
//import NOAA Forecast info
//data ends up in three different arrays:
//$forecasticons
- x = 0 thru 9 This is the icon and text around it
//$forecasttitles
- x = 0 thru 12 This is the title word for the time period
//$forecasttext
- x = 0 thru 12 This is the detail text for the forecast
//
//And one more variable - $lastupdate This is the time of last update
//
//Also, in order for this to work correctly, you need the NOAA icons (or make your own...
//there are over 200!). These need to be placed in the path \ifps\text\images\ to work
//properly (so make a folder in your web HTML root called "ifps", then make a folder in it
//called "text", then make a folder in it called "images" and place the icons in this folder)
//
//http://members.cox.net/carterlakeweather/forecasticons.zip (380K)
//
//URL below --MUST BE-- the Printable Point Forecast from the NOAA website
//
//Not every area of the US has a printable point forecast
//
//This script will ONLY WORK with a printable point forecast!
//
//To find yours in your area:
//
//Go to
www.noaa.gov//Click on the Storm Watch map (middle lower left of page)
//Click on your state
//Click on your area of the state
//Scroll down to the "Additional Forecasts & Info"
//Click on Printable Forecast
//The title of the page should say "Point Forecast (Printable)"
//------------------------------------------------*/
$html = implode('', file('
http://forecast.weather.gov/MapClick.php?CityName=Delta&state=CO&site=GJT&textField1=38.7448&textField2=-108.074&e=0&TextType=2'));
// Just get the top of the NWS page for editing
preg_match('|<tr valign ="top" align="center">(.*)<table width="670"|s', $html, $betweenspan);
$forecastop = $betweenspan[1];
// Chop up each icon html and place in array
preg_match_all("/<td.*>(.*)<\/td>/Uis", $forecastop, $headers);
$forecasticons = $headers[1];
// Now get just the bottom of the NWS page for editing
preg_match('|</table>(.*)<hr>|s', $html, $betweenspan);
$forecast = $betweenspan[1];
// Chop up each title text and place in array
preg_match_all('|<b>(.*): </b>|Ui', $forecast, $headers);
$forecasttitles = $headers[1];
// Chop up each forecast text and place in array
preg_match_all('|</b>(.*)<br>|Ui', $forecast, $headers);
$forecasttext = $headers[1];
// Grab the Last Update date and time.
preg_match('|Last Update: (.*)|', $html, $betweenspan);
$lastupdate = $betweenspan[1];
?>
<!-- ///////////////// END 7 DAY FORECAST SCRIPT ///////////// -->
<!-- ///////////////// START DATE/TIME ZONE SET FOR GRAPH CALL ///////////// -->
<?php
date_default_timezone_set('
America/Denver');
$d = date('j');
$m = date('n');
$y = date('Y');
?>
<!-- ///////////////// END DATE/TIME ZONE SET FOR GRAPH CALL ///////////// -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>DeltaWeatherCam for Mobile Devices</title>
<meta name="description" content="Delta, CO Weather Center for iPhone" />
<meta name="keywords" content="Delta, CO, weather, forecast, current conditions, radar, warnings, apple, iphone" /> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<link rel="stylesheet" type="text/css" href="iphone_iui.css" />
<link rel="stylesheet" type="text/css" href="iphone_base.css" />
</head>
<body>
<div class="panel" selected="true">
<a name="top"></a>
<fieldset>
<table cellspacing="0" width=295 cellpadding="2" class="center" id="searchTable">
<tr>
<td>
<center>
DeltaWeatherCam.com for Mobile Devices
<br /><font size="-1">
(<a href="index.php">switch to our desktop site</a>)</font>
</center></td>
</tr>
</table>
</fieldset>
<script language="javascript">
function ShowCustomDateSelect()
{
document.getElementById("custom_date_select").style.visibility="visible";
document.getElementById("normal_date_select").style.visibility="hidden";
}
</script>
<a name="current"></a>
<h2>Current Conditions</h2>
<fieldset>
<div class="barMenu">
<span class="button">Current</span>
<a href="#webcam" class="button">Webcam</a>
<a href="#severe" class="button">Severe</a>
<a href="#radar" class="button">Radar</a>
</div>
<p class="taC b"></p>
<div id="pwsSelect"></div>
<table cellspacing="0" width=320 cellpadding="5" class="full taL">
<tr>
<td align=left>
At <?php echo $time ?><BR>
Temperature <?php echo $tempnodp ?>° F<BR>
Humidity <?php echo $humidity ?>% <BR>
Dew Point <?php echo $tempnodpf?>° F<BR>
Barometer <?php echo $baroinusa2dp ?> in./Hg<BR>
and <?php echo $trend ?><BR>
Wind <?php echo $dirlabel ?> at <?php echo $avgspd ?> m.p.h.<BR>
Rain Rate <?php echo $hourrn ?> in./hr.<BR>
Daily Rain <?php echo $dayrnusa ?> in.<BR>
Storm Total <?php echo $vpstormrain ?> in.<BR>
Monthly Rain <?php echo $monthrn ?> in.<BR>
Heat Index <?php echo $heati ?>° F<BR>
Wind Chill <?php echo $windch ?>° F<BR>
Sunrise <?php echo $sunrise ?><BR>
Sunset <?php echo $sunset ?><BR><BR>
</td>
</tr>
<tr valign ="top">
<td>
<?echo $forecasticons[0]?><BR><BR>
</td>
</tr>
<tr valign ="top">
<td align=left>
<?echo $forecasttitles[0]?>: </b><?echo $forecasttext[0]?>
</td>
</tr>
</table>
</fieldset>
<a name="graph"></a>
<h2>Graphs</h2>
<fieldset>
<div class="taC tm10 bm10"><img src="
http://i.wund.com/cgi-bin/wxStationGraphAll?ID=KCODELTA2&type=3&showtemp=1&showpressure=1&showwind=1&showwinddir=1&showrain=1&showtitle=0&day=<?php echo $d; ?>&year=<?php echo $y; ?>&month=<?php echo $m; ?>&width=280" alt="
KCODELTA2 Weather Graph"></div>
</fieldset>
<a name="webcam"></a>
<h2>Webcam</h2>
<fieldset>
<div class="barMenu">
<a href="#current" class="button">Current</a>
<span class="button">Webcam</span>
<a href="#severe" class="button">Severe</a>
<a href="#radar" class="button">Radar</a>
</div>
<div class="taC bm10"><img src="
http://deltaweathercam.com/toshibafixed/toshibathumb.jpg" name="camImage" id="camImage" /></div><br />
<!-- Note I added a second cam, you can delete this if you have only 1 -->
<div class="taC bm10"><img src="http://deltaweathercam.com/toshibafixed/c50thumb.jpg" id="camImage" /></div> </fieldset>
<a name="severe"></a>
<h2>Severe</h2>
<fieldset>
<div class="barMenu">
<a href="#current" class="button">Current</a>
<a href="#webcam" class="button">Webcam</a>
<span class="button">Severe</span>
<a href="#radar" class="button">Radar</a>
</div>
<table cellspacing="0" cellpadding="5">
<tr>
<td>
<?php
// Force Defaults for Zone and County
if ( ! isset($_REQUEST['warnzone']) )
$_REQUEST['warnzone']="
COZ011";
if ( ! isset($_REQUEST['warncounty']) )
$_REQUEST['warncounty']="
COC029";
if ( ! isset($_REQUEST['warnlocal']) )
$_REQUEST['warnlocal']="
Delta+CO";
//You can pass data to this script with:
//
http://www.carterlake.org/testadvisory.php?warnzone=KYZ030&warncounty=KYC111&warnlocal=Anchorage+KY//Where the zone is your zone and the county is your county and location is your location
//using pluses in place of spaces
$warnzone = $_REQUEST['warnzone'];
$warncounty = $_REQUEST['warncounty'];
$warnlocal = $_REQUEST['warnlocal'];
//import NOAA Advisory info
//data can be altered by changing the zone and county numbers
//Target data ends up in $targetwarn and $targettext[0]
$html = implode('', file("
http://www.crh.noaa.gov/showsigwx.php?warnzone=${warnzone}&warncounty=${warncounty}"));
//Get the advisory headers and put them in an array
preg_match_all('|<h3>(.*)</h3>|', $html, $headers);
$warnheaders = $headers[1];
//Get the advisory text and put them into an array as well
preg_match_all('|<pre>(.*)</pre>|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 there are none of the above found. Set the advisory to default message.
if ($targetwarn == "Hazardous Weather Outlook") {
$targetwarn = "NO CURRENT
DELTA ADVISORIES";
$targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR
DELTA";
} else if ($targetwarn == "No Active Hazardous Weather Conditions Found") {
$targetwarn = "NO CURRENT
DELTA ADVISORIES";
$targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR
DELTA";
} else if (empty($targetwarn)) {
$targetwarn = "NO CURRENT
DELTA ADVISORIES";
$targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR
DELTA";
} else if ($targetwarn == "Short Term Forecast") {
$targetwarn = "NO CURRENT
DELTA ADVISORIES";
$targettext[0] = "THERE ARE NO ACTIVE WATCHES, WARNINGS OR ADVISORIES FOR
DELTA";
}
if ($targetwarn <> "NO CURRENT
DELTA ADVISORIES") {
$warnlist = 'ALL CURRENT ADVISORIES:';
for ($i = 0; $i <= count($warnheaders); $i++) {
$warnheaderplus = preg_replace( '| |', '+', $warnheaders[$i] );
$warnlist = $warnlist . '<br><a href="
http://www.crh.noaa.gov/showsigwx.php?warnzone=' . $warnzone. '&warncounty=' . $warncounty . '&local_place1=' . $warnlocal . '&product1=' . $warnheaderplus . '" target="_new">' . $warnheaders[$i] . '</a>';
}
}
}
echo "<br>";
echo "<center>";
echo "<b>";
echo $targetwarn;
echo "</b>";
echo "</center>";
echo "<br><br>";
echo "<center>";
echo $warnlist;
echo "</center>";
?>
</FONT></td>
</tr>
</table>
</fieldset>
<script type="text/javascript">
var animated = false;
var severe = false;
var radius = 80;
function wui_setOpacity_severe(image,opacity){
if(opacity<0){opacity=0;} if(opacity>=100){opacity=100;}
var c=opacity/100;
if(typeof(image.style.filter)!='undefined'){image.style.filter='alpha(opacity:'+opacity+')';}
if(typeof(image.style.KHTMLOpacity)=='string'){image.style.KHTMLOpacity=c;}
if(typeof(image.style.MozOpacity)=='string'){image.style.MozOpacity=c;}
if(typeof(image.style.opacity)=='string'){image.style.opacity=c;}
}
function toggleRadar(element) {
element.setAttribute("toggled", element.getAttribute("toggled") != "true");
if(animated==true) {
animated = false;
}
else {
animated = true;
}
changeRadarSource(animated, radius);
}
function toggleSevere(element) {
var severe_overlay = document.getElementById('severe_overlay');
element.setAttribute("toggled", element.getAttribute("toggled") != "true");
if(severe==true) {
wui_setOpacity_severe( severe_overlay,0);
severe = false;
}
else {
wui_setOpacity_severe( severe_overlay,60);
severe = true;
}
}
function changeSevereSource(radius)
{
var myradius = radius*1.852;
var severe_overlay="
http://wumaps.wunderground.com/cgi-bin/mapgen?theme=severe&stdout=1&size=278x278&lat=38.740&lon=-108.091&format=gif&alpha=1&radius="+myradius+"&r="+new Date().getTime();
document.getElementById('severe_overlay').src = severe_overlay;
return;
}
function changeRadarSource(animated, radius)
{
var num = 1;
if (animated == true)
num = 6;
document.getElementById('radarImage').src = "
http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_composite?centerlat=38.740¢erlon=-108.091&radius="+radius+"&type=N0R&frame=0&num="+num+"&delay=15&width=278&height=278&newmaps=1&r=1225814451&smooth=1&rainsnow=1&
lat=38.740&lon=-108.091&label=You+Are+Here";
return;
}
function DimButtons(target)
{
document.getElementById('radar_region').className = "whiteButton";
document.getElementById('radar_default').className = "whiteButton";
document.getElementById('radar_local').className = "whiteButton";
target.className = "whiteButtonDim";
return;
}
</script>
<a name="radar"></a>
<h2>Current Radar</h2>
<fieldset>
<div class="barMenu">
<a href="#current" class="button">Current</a>
<a href="#webcam" class="button">Webcam</a>
<a href="#severe" class="button">Severe</a>
<span class="button">Radar</span>
</div>
<div class="taC" style="height: 288px;">
<img src="javascript: changeRadarSource(animated,radius);" alt="" id="radarImage" /><br />
<img src="" width="278" height="278" id="severe_overlay" style="position: relative; top: -278px;" />
</div>
<script language="javascript">
changeRadarSource(animated,radius);
severe=false; changeSevereSource(radius); wui_setOpacity_severe( document.getElementById('severe_overlay'),0);
</script>
<table cellspacing="0" cellpadding="0" class="zoomMenu">
<tr>
<td><a id="radar_region" href="#radar" class="whiteButton" onclick="radius=120; changeRadarSource(animated, radius); changeSevereSource(radius); DimButtons(this); return false;">Region</a></td>
<td><a id="radar_default" href="#radar" class="whiteButtonDim" onclick="radius=80; changeRadarSource(animated, radius); changeSevereSource(radius); DimButtons(this); return false;">Default</a></td>
<td><a id="radar_local" href="#radar" class="whiteButton" onclick="radius=15; changeRadarSource(animated, radius); changeSevereSource(radius); DimButtons(this); return false;">Local</a></td>
</tr>
</table>
<div class="row">
<label class="nobr">Animated Radar:</label>
<div class="toggle" onclick="toggleRadar(this)" toggled="true">
<span class="thumb"></span>
<span class="toggleOn">No</span>
<span class="toggleOff">Yes</span>
</div>
</div>
<div class="row">
<label class="nobr">Severe Overlay:</label>
<div class="toggle" onclick="toggleSevere(this)" toggled="true">
<span class="thumb"></span>
<span class="toggleOn">No</span>
<span class="toggleOff">Yes</span>
</div>
</div>
</fieldset>
<a name="about"></a>
<h2>About</h2>
<fieldset>
<table cellspacing="0" width=320 cellpadding="5" class="full taL">
<tr>
<td class="full">
<div><span class="b">Elevation:</span> 5,060 ft</div>
<div><span class="b">Hardware:</span>Davis Vantage Pro 2 </div>
<div><span class="b">Software:</span>Virtual Weather Station & Weather Display<br /><a href="http://usaweatherfinder.com/">
<img src="http://usaweatherfinder.com/button.php?u=up10ad" alt="USA Weather Finder" border="0" />
</a></div>
</td>
</tr>
</table>
<p class="taC">