Jump to content

Mysql Check Code


host-provider

Recommended Posts

Hello,

 

I have a code which i use to check mysql server is up or down it is showing correct result but if i want to add another ip of same server too how it is possible?

<?php
$server = "localhost";
$portg = "3306";
#$portl = "login server port";
$timeout = "2";

$game = @fsockopen("$server", $portg, $errno, $errstr, $timeout);
    echo "<br>SERVICE: ";
    echo $game ? "<font color=\"#00CC33\"><b>ONLINE</b></font>" : "<font color=\"red\"><b>OFFLINE</b></font>";
?>
Link to comment
https://forums.phpfreaks.com/topic/283346-mysql-check-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.