Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = 'localhost';
- $port = 8085;
- function realm_status(){
- global $host, $port;
- $status = @fsockopen($host, $port, $error_no, $error_str, (float) 0.5);
- if ($status){
- @fclose($status);
- return true;
- }else
- return false;
- }
- if (realm_status())
- $value .= '<font color=\'green\'><b>Включен</b></font>';
- else
- $value .= '<font color=\'red\'><b>Выключен</b></font>';
- print "<h3 align=\"center\">Статус сервера: $value</h3>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement