Changeset 18 for measure_scripts/traffic.php
- Timestamp:
- Oct 22, 2007, 4:58:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
measure_scripts/traffic.php
r13 r18 21 21 } 22 22 restore_error_handler(); 23 } 24 25 function Ping() 26 { 27 //$File = fopen('/a/log/ping_nix.txt', 'r'); 28 //$Row = fgets($File); 29 //fclose($File); 30 exec('ping nix.cz -c 1 |grep time=', $Row); 31 $Parts = explode(' ', $Row); 32 if(count($Parts) > 6) 33 { 34 $Time = $Parts[7]; 35 $TimeParts = explode('=', $Time); 36 return($TimeParts[1]); 37 } else return(0); 23 38 } 24 39 … … 180 195 file_get_contents($URL.'?MeasureId=15&Value='.$Value); 181 196 197 // Ping nix.cz 198 $Value = Ping(); 199 file_get_contents($URL.'?MeasureId=16&Value='.$Value); 200 182 201 sleep(60); 183 202 }
Note:
See TracChangeset
for help on using the changeset viewer.