├── up.png ├── down.jpg ├── server.jpg ├── Screenshots └── Screenshot001.png ├── readme.md └── index.php /up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zag2me/PHP-Server-Monitor/HEAD/up.png -------------------------------------------------------------------------------- /down.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zag2me/PHP-Server-Monitor/HEAD/down.jpg -------------------------------------------------------------------------------- /server.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zag2me/PHP-Server-Monitor/HEAD/server.jpg -------------------------------------------------------------------------------- /Screenshots/Screenshot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zag2me/PHP-Server-Monitor/HEAD/Screenshots/Screenshot001.png -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Description 2 | =========== 3 | 4 | Just a little PHP script to ping your servers. 5 | 6 | You will need to add your servers and their roles to the top of the file. 7 | 8 | Code is free, use as you wish. 9 | 10 | 11 | Install 12 | =========== 13 | 14 | You will need a web server that runs PHP and the servers must be pingable from inside your network. 15 | 16 | Edit the index.php file at the top to add your own servers 17 | 18 | 19 | Screenshots 20 | =========== 21 | 22 | ![Main Page](https://raw.githubusercontent.com/zag2me/PHP-Server-Monitor/master/Screenshots/Screenshot001.png "Main Page") -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | .:: PHP Server Monitor :..
3 |

School Server Monitor

4 |

5 | "; 40 | foreach ($host as $value) 41 | { 42 | $counter = $count + 1; 43 | echo "$value"; 44 | echo ''; 45 | //check target IP or domain 46 | $pingreply = exec("ping -n $count $value"); 47 | if ( substr($pingreply, -2) == 'ms') 48 | { 49 | #echo "UP"; 50 | echo ""; 51 | echo "". $services[$counter] . ""; 52 | echo "Reply Speed "; 53 | echo substr($pingreply, -13); 54 | } 55 | else 56 | { 57 | #echo "DOWN"; 58 | echo ""; 59 | echo "". $services[$counter] . ""; 60 | echo ""; 61 | echo "Timeout..."; 62 | } 63 | } 64 | echo ""; 65 | ?> 66 |
67 | --------------------------------------------------------------------------------