Mercurial > hg > index.fcgi > www > www-1
changeset 32:4d71846e56ee
remove weather/
author | paulo |
---|---|
date | Wed, 09 May 2012 01:00:52 -0700 |
parents | fa86ad0325ad |
children | 37ebfd93c8c2 |
files | weather/getweather.sh weather/index.css weather/index.php |
diffstat | 3 files changed, 0 insertions(+), 47 deletions(-) [+] |
line diff
1.1 --- a/weather/getweather.sh Sun Jan 08 17:57:08 2012 -0800 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,5 +0,0 @@ 1.4 -#!/bin/sh 1.5 - 1.6 -URL=ftp://tgftp.nws.noaa.gov/data/forecasts/zone/ca/caz043.txt 1.7 - 1.8 -wget -O - ${URL}
2.1 --- a/weather/index.css Sun Jan 08 17:57:08 2012 -0800 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,1 +0,0 @@ 2.4 -@import "../index.css";
3.1 --- a/weather/index.php Sun Jan 08 17:57:08 2012 -0800 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,41 +0,0 @@ 3.4 -<HTML> 3.5 -<HEAD> 3.6 -<TITLE>Weather</TITLE> 3.7 -<LINK REL="stylesheet" TYPE="text/css" HREF="index.css"> 3.8 -</HEAD> 3.9 - 3.10 -<BODY> 3.11 - 3.12 -<?php 3.13 -umask(0037); 3.14 - 3.15 -$start_time = microtime(true); 3.16 - 3.17 -$cache_fn = "__cache__.txt"; 3.18 -$cache_life = "86400"; 3.19 - 3.20 -$cache_mtime = "0"; 3.21 -if (file_exists($cache_fn) && filesize($cache_fn) > 0) 3.22 - $cache_mtime = filemtime($cache_fn); 3.23 - 3.24 -$newbody = ''; 3.25 - 3.26 -if ((time() - $cache_mtime >= $cache_life)) { 3.27 - $newbody = shell_exec('./getweather.sh'); 3.28 - file_put_contents($cache_fn, $newbody); 3.29 -} else { 3.30 - $newbody = file_get_contents($cache_fn); 3.31 -} 3.32 - 3.33 -$end_time = microtime(true); 3.34 -$elapsed_time = $end_time - $start_time; 3.35 - 3.36 -echo "<PRE>"; 3.37 -echo $newbody; 3.38 -echo "</PRE>"; 3.39 - 3.40 -echo "<DIV class=\"debug\">Time elapsed: " . sprintf("%.3f", $elapsed_time) . " seconds.</DIV>"; 3.41 -?> 3.42 - 3.43 -</BODY> 3.44 -</HTML>