name; $matches=0; $fd=fopen($targetstring, "r"); if ($fd) { while (!feof($fd)) { $buffer=fgets($fd, 4096); # strip out any Windows line-endings that have gotten in here $buffer=str_replace("\r", "", $buffer); if (preg_match("/^$itemname\t(\d+\.?\d*[KMGT]*)\t(\d+\.?\d*[KMGT]*)/", $buffer, $matches)) { $inbw=unformat_number($matches[1]); $outbw=unformat_number($matches[2]); } } $stats = stat($targetstring); $data_time = $stats['mtime']; } else { // some error code to go in here debug ("TabText ReadData: Couldn't open ($targetstring). \n"); } debug ("TabText ReadData: Returning ($inbw,$outbw,$data_time)\n"); return ( array($inbw,$outbw,$data_time) ); } } // vim:ts=4:sw=4: ?> WebSVN - weathermap - Blame - Rev 78 - /lib/datasources/WeatherMapDataSource_tabfile.php
  jablonka.czprosek.czf

weathermap

Subversion Repositories:
[/] [lib/] [datasources/] [WeatherMapDataSource_tabfile.php] - Blame information for rev 78

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1