.hidden { display: none; position: absolute; left: 0px; top: 0px; } .shown { display: block; position: absolute; left: 0px; top: 0px; } .center { width:100%; margin-left: auto; margin-right: auto; } '; } /****************** End Defaults to allow StandAlone Debugging ***************/ if (isset($_POST['fctype'])) { # Are we using jQuery??? $forecastType = $_POST['fctype']; # If so, set fctype. if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') { include_once ('Settings.php'); // jQuery forgets these on my localhost! } } if (isset($_POST['useOnClick'])) { # Are we using jQuery??? $useOnClick = $_POST['useOnClick']; # If so, set fctype. if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') { include_once ('Settings.php'); // jQuery forgets these on my localhost! } } if (isset($_POST['divWidth'])) { # Are we using jQuery??? $divWidth = $_POST['divWidth']; # If so, set fctype. if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') { include_once ('Settings.php'); // jQuery forgets these on my localhost! } } if (isset($_POST['checkFileTimes'])) { # Are we using jQuery??? $checkFileTimes = $_POST['checkFileTimes']; # If so, set fctype. if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') { include_once ('Settings.php'); // jQuery forgets these on my localhost! } } if (isset($_POST['standAlone'])) { # Are we using jQuery??? $standAlone = $_POST['standAlone']; # If so, set fctype. if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') { include_once ('Settings.php'); // jQuery forgets these on my localhost! } } ?>
Select Another Forecast Type:  
=(1+$useDST) && $theHour<(12+$useDST)) || ((($theHour==(0+$useDST)?1:0) && $theMin>$mapChangeMinute) && $theHour<(13+$useDST)) || ((($theHour==(12+$useDST)?1:0) && $theMin<$mapChangeMinute)))?1:0; $useAMModeAK = (($theHour>=(0+$useDST) && $theHour<(12+$useDST)) || ((($theHour==(0+$useDST)?1:0) && $theMin<$mapChangeMinute) && $theHour<(12+$useDST)) || ((($theHour==(12+$useDST)?1:0) && $theMin<$mapChangeMinute)))?1:0; $compareWx = false; if ($forecastType == 'Wx') { $forecastText = 'Weather'; } else if ($forecastType == 'rpi') { $forecastText = 'Precipitation Potential'; } else if ($forecastType == 'ppi') { $forecastText = 'Liquid Potential'; } else if ($forecastType == 'tpi') { $forecastText = 'Thunder Potential'; } else if ($forecastType == 'spi') { $forecastText = 'Severe Potential'; } else if ($forecastType == 'fpi') { $forecastText = 'Frozen Precip. Potential'; } else if ($forecastType == 'nxpin') { $forecastText = 'Precipitation Intensity'; } else if ($forecastType == 'zpi') { $forecastText = 'Freezing Temp. Potential'; } else if ($forecastType == 'AWx') { $forecastText = 'AK Weather'; $forecastType = 'Wx'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Arpi') { $forecastText = 'AK Precipitation Potential'; $forecastType = 'rpi'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Atpi') { $forecastText = 'AK Thunder Potential'; $forecastType = 'tpi'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Aspi') { $forecastText = 'AK Severe Potential'; $forecastType = 'spi'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Afpi') { $forecastText = 'AK Frozen Precip. Potential'; $forecastType = 'fpi'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Anxpin') { $forecastText = 'AK Precipitation Intensity'; $forecastType = 'nxpin'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; } else if ($forecastType == 'Azpi') { $forecastText = 'AK Freezing Temp. Potential'; $forecastType = 'zpi'; $mapDir = 'akwx_imgs'; $locale = 'alaska'; // Comparison charts are quite different! } else if ($forecastType == 'CompWx') { $forecastText = 'Weather'; $mapDir = 'cocomp_imgs'; $mapMaxN = 40; // Was the only Comp chart with 35 charts - all others used to have 25 but now also maybe??? have 35 $compareWx = true; } else if ($forecastType == 'CompRA') { $forecastText = 'Liquid Potential'; $mapDir = 'cocomp_imgs'; $mapMaxN = 32; } else if ($forecastType == 'CompTSTM') { $forecastText = 'Thunder Potential'; $mapDir = 'cocomp_imgs'; $mapMaxN = 32; } else if ($forecastType == 'CompSVR') { $forecastText = 'Severe Potential'; $mapDir = 'cocomp_imgs'; $mapMaxN = 32; } else if ($forecastType == 'CompFR') { $forecastText = 'Frozen Precip. Potential'; $mapDir = 'cocomp_imgs'; $mapMaxN = 32; } else if ($forecastType == 'CompZR') { $forecastText = 'Freezing Temp. Potential'; $mapDir = 'cocomp_imgs'; $mapMaxN = 32; } $compare = (strpos($forecastType,'Comp')===false?false:true); date_default_timezone_set("America/New_York"); // The NWS calculations for these charts is GMT ?> '; * End Debug Code */ if ($nowTime >= $imageTime + $staleSeconds ) { echo '

These Experimental Images Are Not Current!
Images last updated '.date("l F j, Y",$imageTime).' at around '.date("g:i a",$imageTime).'.

'; } ?> These Experimental Images May Not Be Current!
Check the Map Times to Confirm Their Status.

'; }?>
style="width:px">
':'');?> =(1+$useDST) && $theHour<(12+$useDST)) || ((($theHour==(0+$useDST)?1:0) && $theMin>$mapChangeMinute) && $theHour<(13+$useDST)) || ((($theHour==(12+$useDST)?1:0) && $theMin<$mapChangeMinute)))?1:0; // $useAMMode = 0; // Debug Code // echo '$useAMMode: '.$useAMMode.', $theHour: '.$theHour.', $theMin: '.$theMin.', $useDST: '.$useDST.',
$theHour==(0+$useDST): '.(($theHour==(0+$useDST))?1:0).'
'; // Debug Code // $useAMMode represents the 2am to 2pm Eastern Time Map Cycle. It uses the last half of today and pushes into the first half of a new day. $linkStr = ' (Times Currently are '.($locale=='conus25'?'Eastern':'Alaskan').' '.($useDST?'Daylight':'Standard').' Time - Some Map Times May be '.($useDST?'Standard':'Daylight').' Time.)

':''; $hrSequence = array(); // Instantiate and populate the 8 or 4 member 'am' and 'pm' arrays, e.g. 2am, 5am, 8am, 11am, 2pm, 5pm, 8pm, 11pm $hrSequence2 = array(); $amPmSequence4DST = array('2am','8am','2pm','8pm'); $amPmSequence8amDST = array('2am','5am','8am','11am','2pm','5pm','8pm','11pm'); $amPmSequence8pmDST = array('2pm','5pm','8pm','11pm','2am','5am','8am','11am'); $amPmSequence4 = array('1am','7am','1pm','7pm'); $amPmSequence8am = array('1am','4am','7am','10am','1pm','4pm','7pm','10pm'); $amPmSequence8pm = array('1pm','4pm','7pm','10pm','1am','4am','7am','10am'); $hrSequence = ($useAMMode?($useDST?$amPmSequence8amDST:$amPmSequence8am):($useDST?$amPmSequence8pmDST:$amPmSequence8pm)); $hrSequence2 = $useDST?$amPmSequence4DST:$amPmSequence4; $hrSequence = ($locale=='alaska'?($useAMModeAK?$amPmSequence8am:$amPmSequence8pm):$hrSequence); $hrSequence2 = ($locale=='alaska'?$amPmSequence4:($useDST?$amPmSequence4DST:$amPmSequence4)); if ( !$compare ) { echo ''; // Create link table for ($mapNo=($locale=='conus25'?1:2); $mapNo<$mapMaxN; $mapNo++) { // Parameters vary with time of day if ($mapNo==($locale=='conus25'?1:2) || $useAMMode) { // In the AM or if this is the beginning of our array, start with the date echo ''; // Begin table row with 'Outlook' if ($mapNo==($locale=='conus25'?1:2) && !$useAMMode) { echo ''; // First four cells of first row are blank in PM Mode } } for ($hrNo=0; $hrNo<8; $hrNo++) { // For each 8 forecasts per day if (!$useAMMode) { // If in PM mode if ($hrNo==3) { // We've reached the end of the first day, so end row and start a new day and row echo ''; // End table row echo ''; // and begin another one } else if ($mapNo<=$mapMaxN) { // Otherwise add a cell/link to current row echo ''; } } else { // If in AM mode if (($hrNo==7 && $mapNo<$mapMaxN)||($hrNo==6&&$mapNo==$mapMaxN)) { // Break at the end of a 8 cells or at the last cell echo ''; // Populate a cell if ($mapNo!=$mapMaxN) { echo ''; } // Only end table row if we're creating a new one } else if ($mapNo<=$mapMaxN) { // Otherwise add another cell echo ''; } } $mapNo++; } $mapNo--; } echo '
Outlook '.date("D M j",$chart[$mapNo]).':   at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.$hrSequence[$hrNo].' 
Outlook '.date("D M j",($chart[($mapNo+3)]+1)).':  at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.$hrSequence[$hrNo].'  at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.$hrSequence[$hrNo].' 
 at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.$hrSequence[$hrNo].' 
'; // End of row, body, and table } else if ($compare) { if ($forecastType=='CompWx') { // if ($forecastType=='CompWx'||$forecastType == 'CompRA'||$forecastType == 'CompTSTM'||$forecastType == 'CompSVR'|| // $forecastType == 'CompFR'||$forecastType == 'CompFR'||$forecastType == 'CompZR') { // CompWx was different from the other Comp's. echo ''; // Create link table if ($useAMMode) { for ($mapNo=1; $mapNo<($mapMaxN); $mapNo++) { // Outer loop // echo '$mapNo:'.$mapNo; // Eebug Code if ($mapNo==1 || $mapNo==9 || $mapNo==($compareWx?17:16) || $mapNo==($compareWx?24:20) || $mapNo==($compareWx?28:24) || $mapNo==($compareWx?32:28)|| $mapNo==($compareWx?36:32)) { // AM Mode @ 6:30 AM echo ''; // Begin table row with 'Outlook' } for ($hrNo=0; $hrNo<(($mapNo>($compareWx?23:15))?4:8)&&$mapNo<($mapMaxN); $hrNo++) { // Inner loop for each 8 or 4 forecasts per day if (($hrNo==($mapNo<($compareWx?24:16)?7:3) && $mapNo<($mapMaxN))||($hrNo==6&&$mapNo==($mapMaxN-1))) { // Break after 8 or 3 cells and the last cell echo ''; // Populate a cell if ($mapNo<($mapMaxN)) { echo ''; } // Only end table row if we're creating a new one } else if ($mapNo<($mapMaxN)) { // Otherwise add another cell with appropiate table spacing echo ''.(($mapNo>($compareWx?23:15))?'':''); } $mapNo++; // Get ready for the next map at end of inner for loop } $mapNo--; // Back off non-existent map at end of outer for loop } echo '
Outlook '.date("D M j",$chart[$mapNo>($compareWx?22:15)?$mapNo+1:$mapNo]).':  at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.(($mapNo>($compareWx?23:15))?$hrSequence2[$hrNo]:$hrSequence[$hrNo]).' 
 at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.(($mapNo>($compareWx?23:15))?$hrSequence2[$hrNo]:$hrSequence[$hrNo]).' 
'; // End of row, body, and table } // End of Use AM Mode else if (!$useAMMode) { for ($mapNo=1; $mapNo<($mapMaxN-7); $mapNo++) { // Outer loop // echo '$mapNo:'.$mapNo; // Eebug Code if ($mapNo==1 || $mapNo==6 || $mapNo==($compareWx?15:11) || $mapNo==($compareWx?19:16) || $mapNo==($compareWx?24:20) || $mapNo==($compareWx?28:24) || $mapNo==($compareWx?32:28) || $mapNo==($compareWx?36:32)) { echo 'Outlook '.date("D M j",$chart[$mapNo>($compareWx?19:11)?$mapNo+4:$mapNo]).': '; // Begin table row with 'Outlook' if ($mapNo==1 ){ echo ' '; // First four cells of first row are blank in PM Mode } } for ($hrNo=0; $hrNo<($mapNo>($compareWx?19:11)?4:8)&&$mapNo<($mapMaxN); $hrNo++) { // Inner loop for each 8 or 4 forecasts per day if ($hrNo==3 || $mapNo==($compareWx?19:11)) { // We've reached the end of the first or third day, so end row and start a new day and row echo ' at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.(($mapNo>($compareWx?19:11))?$hrSequence2[$hrNo]:$hrSequence[$hrNo]).'
 '; // End table row echo (($mapNo>($compareWx?19:11))?'':'Outlook '.date("D M j",($chart[($mapNo+3)]+1)).': '); // and begin another one } else if ($mapNo<($mapMaxN)) { // Otherwise add a cell/link to current row unless $compare is at end of sequence echo ' at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.(($mapNo>($compareWx?19:11))?$hrSequence2[$hrNo]:$hrSequence[$hrNo]).' '.(($mapNo>($compareWx?18:10))?' ':''); } $mapNo++; // Get ready for the next map at end of inner for loop if ($mapNo==($compareWx?20:12)) { break; } } $mapNo--; // Back off non-existent map at end of outer for loop } echo ''; // End of row, body, and table } // End of Use PM Mode } // End of 'CompWx' else { // All other 'Comp' forecast types echo ''; // Create link table if ($useAMMode) { for ($mapNo=1; $mapNo<($mapMaxN); $mapNo++) { // Outer loop if ($mapNo==1 || $mapNo==9 || $mapNo==16 || $mapNo==20 || $mapNo==24 || $mapNo==28 || $mapNo==32 || $mapNo==36) { // AM Mode @ 6:30 AM echo ''; // Begin table row with 'Outlook' } for ($hrNo=0; $hrNo<($mapNo<16?8:4)&&$mapNo<($mapMaxN); $hrNo++) { // Inner loop for each 8 or 4 forecasts per day if (($hrNo==(($mapNo<16?7:3)) && $mapNo<($mapMaxN))||($hrNo==2&&$mapNo==($mapMaxN-1))) { // Break after 3 cells and the last cell echo ''.($mapNo>15?'':''); // Populate a cell if ($mapNo<($mapMaxN)) { echo ''; } // Only end table row if we're creating a new one } else if ($mapNo<($mapMaxN)) { // Otherwise add another cell with appropiate table spacing echo ''.($mapNo>15?'':''); } $mapNo++; // Get ready for the next map at end of inner for loop } $mapNo--; // Back off non-existent map at end of outer for loop } echo '
Outlook '.date("D M j",$chart[$mapNo]).':  at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.($mapNo<16?$hrSequence[$hrNo]:$hrSequence2[$hrNo]).' 
 at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.($mapNo<16?$hrSequence[$hrNo]:$hrSequence2[$hrNo]).' 
'; // End of row, body, and table } // End of Use AM Mode else if (!$useAMMode) { for ($mapNo=1; $mapNo<($mapMaxN); $mapNo++) { // Outer loop if ($mapNo==1 || $mapNo==5 || $mapNo==12 || $mapNo==16 || $mapNo==20 || $mapNo==24 || $mapNo==28 || $mapNo==32) { echo 'Outlook '.date("D M j",$chart[$mapNo]).': '; // Begin table row with 'Outlook' if ($mapNo==1 ){ echo ' '; // First four cells of first row are blank in PM Mode } } # $innerLoopCounter = 0; // Debug Code for ($hrNo=0; ($mapNo<($mapMaxN))&&$hrNo<(($mapNo>3&&$mapNo<13)?8:4); $hrNo++) { // Inner loop for each 8 or 4 forecasts per day if ($hrNo==(($mapNo>3&&$mapNo<13)?6:3)) { // start a new day and row echo ' at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.($mapNo<13?$amPmSequence8amDST[$hrNo]:$hrSequence2[$hrNo]).' '.($mapNo>11?'':''); // End table row } else if ($mapNo<($mapMaxN)) { // Otherwise add a cell/link to current row unless $compare is at end of sequence echo ' at '.$linkStr.($mapNo<10?'0'.$mapNo:$mapNo).'\')">'.($mapNo<13?$amPmSequence8amDST[$hrNo]:$hrSequence2[$hrNo]).' '.($mapNo>11?'':''); } $mapNo++; if ($mapNo==5||$mapNo==12) break; } $mapNo--; // Back off non-existent map at end of outer for loop } echo ''; // End of row, body, and table } // End of Use PM Mode } // End of All Other Comp forecast types } if ( !$compare ) { echo '
('.($useOnClick?'Click':'Hover over').' a link to display that chart.)
'; ?>

':'').''.($divWidth<800?'':''); } ?>
':'').'Chart 0'.($divWidth<800?'':'')?>
('.($useOnClick?'Click':'Hover over').' a link to display that chart.)
'; ?>

':'').''.($divWidth<800?'':''); } ?>
':'').'Chart 0'.($divWidth<800?'':'')?>

Click Here to Toggle Legend 

'; } else { // Display generic legend except for precipitation intensity if ($forecastType != 'nxpin') { echo '

Click Here to Toggle Legend

'; } }?>

Caution! These maps are updated around ' .(date('I')?($locale=='conus25'?'1':'9'):($locale=='conus25'?'12':'8')).':30 to '.(date('I')?($locale=='conus25'?'1':'9'):($locale=='conus25'?'12':'8')).':45 '.($locale=='conus25'?'AM':'PM').' & '.($locale=='conus25'?'PM':'AM').' '.($locale=='conus25'?'Eastern':'Alaskan').' '.(date('I')?'Daylight':'Standard').' Time.
Current maps may be unavailable during this process.
There are MANY images to load.

'; ?>

Larger Images

Maps and Data Courtesy of NOAA NWS Meteorological Development Laboratory
Gridded Model Output Statistics (MOS) Experimental 2.5km Grids
.
Script by SE Lincoln Weather.

0?0:-1), $lastHalf=0; $mapNo<=$maxMaps; $mapNo++) { for ($mapHrNo=0; $mapHrNo<(($compare&&$mapNo>($compareWx?23:19))?4:8); $mapHrNo++) { // For all 8 map hours, do the following: if (!$useAMMode) { // In PM split date for the last half of each $chart[$mapNo] by using $lastHalf flag $chart[$mapNo] = mktime(0,0,0,date("m"),date("d")+($dayNo+$lastHalf),date("Y")); if ($mapHrNo>3) { $lastHalf = 1; // Set 'last half' flag } else { $lastHalf = 0; // Reset 'last half' flag } } else { // Otherwise follow normal dates sequence for $chart[$mapNo] in AM $chart[$mapNo] = mktime(0,0,0,date("m"),date("d")+$dayNo,date("Y")); } if ($mapHrNo==7) { $lastHalf=0; } $mapNo++; // End of inner 'for' loop } $mapNo--; // Back off $mapNo because it incrmented one too many before here $dayNo++; // Increment date flag at end of outer 'for' loop } return $chart; } ################# End Function get_charts() ################### ################### Function get_charts2() #################### function get_charts2($maxMaps) { $maxMaps +=2; $chart = array(); global $compare; global $useAMMode; for ($mapNo=0, $dayNo=(date("G")>0?0:-1), $lastHalf=0; $mapNo<=$maxMaps; $mapNo++) { // Displays Today's Maps // for ($mapNo=0, $dayNo=(date("G")>1?1:0), $lastHalf=0; $mapNo<=$maxMaps; $mapNo++) { // No longer display today's maps for ($mapHrNo=0; $mapHrNo<($mapNo<($useAMMode?16:12)?8:4); $mapHrNo++, $mapNo++) { // For all 4 map hours, do the following: if (!$useAMMode) { // In PM split date for the last half of each $chart[$mapNo] by using $lastHalf flag if ($mapHrNo>3) { // if ($mapHrNo>((($mapNo>11)||($mapNo<3))?3:7)) { $lastHalf = 1; // Set 'last half' flag } else { $lastHalf = 0; // Reset 'last half' flag } $chart[$mapNo] = mktime(0,0,0,date("m"),date("d")+($dayNo+$lastHalf),date("Y")); } else { // Otherwise follow normal dates sequence for $chart[$mapNo] in AM $chart[$mapNo] = mktime(0,0,0,date("m"),date("d")+$dayNo,date("Y")); } if ($mapNo>($useAMMode?16:12) && $mapHrNo==3) { $lastHalf=0; } //$mapNo++; // End of inner 'for' loop } $mapNo--; // Back off $mapNo because it incrmented one too many before here $dayNo++; // Increment date flag at end of outer 'for' loop } /* Debug Code * for ($i=0; $i<$mapNo; $i++) { echo '$chart '.$i.' = '.date("D m Y",$chart[$i]).'
'; } /* End Debug Code */ return $chart; } ################# End Function get_charts2() ################### ##################### Function get_DST() ###################### function get_dst() { $dstStart = array(); $dstEnd = array(); $startEnd = array(); $now = time(); $startEnd['2015'] = array('03/08','11/01'); $startEnd['2016'] = array('03/13','11/06'); $startEnd['2017'] = array('03/12','11/05'); $startEnd['2018'] = array('03/11','11/04'); $startEnd['2019'] = array('03/10','11/03'); $startEnd['2020'] = array('03/08','11/01'); $startEnd['2021'] = array('03/14','11/07'); $startEnd['2022'] = array('03/13','11/06'); $startEnd['2023'] = array('03/12','11/05'); $startEnd['2024'] = array('03/10','11/03'); $startEnd['2025'] = array('03/09','11/02'); $dstRange = $startEnd[date("Y")]; $dstStart = explode('/',$dstRange[0]); $dstEnd = explode('/',$dstRange[1]); $dstStartRange1 = mktime(0,0,0,$dstStart[0],($dstStart[1]-14),date("Y")); $dstStartRange2 = mktime(0,0,0,$dstStart[0],($dstStart[1]+7),date("Y")); $dstEndRange1 = mktime(0,0,0,$dstEnd[0],($dstEnd[1]-14),date("Y")); $dstEndRange2 = mktime(0,0,0,$dstEnd[0],($dstEnd[1]+7),date("Y")); $inRange = (($now>$dstStartRange1&&$now<$dstStartRange2)||($now>$dstEndRange1&&$now<$dstEndRange2)); /* Debug Code * echo '$dstRange[0]: '.$dstRange[0].', $dstRange[1]: '.$dstRange[1].', $dstStart[0]/[1]: '.$dstStart[0].'/'.$dstStart[1].', $dstEnd[0]/[1]: '.$dstEnd[0].'/'.$dstEnd[1].'
'; echo '$dstStartRange1 - [1]: ',date("m/d",$dstStartRange1).' - '.date("m/d",$dstStartRange2).', $dstEndRange1 - [1]: '.date("m/d",$dstEndRange1).' - '.date("m/d",$dstEndRange2).'
'; echo '$now>$dstStartRange1&&$now<$dstStartRange2): '.(($now>$dstStartRange1&&$now<$dstStartRange2)?'true':'false').', $now>$dstEndRange1&&$now<$dstEndRange2'.(($now>$dstEndRange1&&$now<$dstEndRange2)?'true':'false').'
'; echo '$inRange: '.($inRange?'true':'false').'
'; /* Debug Code */ return $inRange; } ################### End Function get_DST() #################### /* Get Remote File Time */ function filemtime_remote($uri) { $uri = parse_url($uri); $handle = @fsockopen($uri['host'],80); if(!$handle) return 0; fputs($handle,"GET $uri[path] HTTP/1.1\r\nHost: $uri[host]\r\n\r\n"); $result = 0; while(!feof($handle)) { $line = fgets($handle,1024); if(!trim($line)) break; $col = strpos($line,':'); if($col !== false) { $header = trim(substr($line,0,$col)); $value = trim(substr($line,$col+1)); if(strtolower($header) == 'last-modified') { $result = strtotime($value); break; } } } fclose($handle); return $result; } // echo filemtime_remote('http://www.somesite.com/someimage.jpg'); /* End Get Remote Filetime */ ?>