- <?php
- $fp = fopen("hosts", "r");
- while (!feof($fp)) {
- $host = fgets($fp);
- $handle = popen("/bin/ping -c2 -q ".$host, "r");
- $message = "$host appears to be down";
- while (!feof($handle)) {
- $info = fgets($handle);
- if (strpos($info, "100% packet loss")) {
- }
- }
- }
- fclose($fp);
- pclose($handle);
- ?>
Posted by whodey on Wed 27th Sep 09:38
download | new post
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.