source: www/statistic/temperature.php@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

  • Property svn:executable set to *
File size: 438 bytes
Line 
1<?
2 $Text = getenv('temperature');
3 $Parts = explode(',',$Text);
4 array_pop($Parts);
5 sort($Parts);
6 $Median = $Parts[count($Parts)/2];
7
8/* $Parts = array_slice($Parts,10,80);
9 $Total = 0;
10 foreach($Parts as $Item)
11 $Total = $Total + $Item;
12 //print_r($Parts);
13 echo(", ".$Total/count($Parts));
14*/
15 echo($Median."\n");
16 $File = fopen('/tmp/temperature','w+');
17 fputs($File,$Median);
18 fclose($File);
19?>
Note: See TracBrowser for help on using the repository browser.