0x1998 - MANAGER
Edit File: index.php
<?php error_reporting(0); header("Content-Type: application/json; charset=UTF-8"); function check_tcp_port($host, $port, $timeout) { $socket = fsockopen($host, $port, $errno, $errstr, $timeout); if (!$socket) { return false; } else { fclose($socket); return true; } } $host = "webc1966.cluster024.gra.hosting.ovh.net"; if (!check_tcp_port($host, 3306, 3)) { $mysql_status = "KO"; } else { $mysql_status = "OK"; } if (!check_tcp_port($host, 27017, 3)) { $mongodb_status = "KO"; } else { $mongodb_status = "OK"; } echo <<< EOF { "proxy": "OK", "apache": "OK", "php": "OK", "mysql": "$mysql_status", "mongodb": "$mongodb_status" } EOF; ?>