DecemberGuild
New Member
- Messages
- 107
- Reaction score
- 0
- Points
- 0
Is there a script that I can use to display the MySQL and FTP status of the free servers on my page?
<?php
$fp = fsockopen('64.92.165.74', 3306,$errno,$errstr, 4);
if (!$fp){
$data = "<font color=red size=3>MySQL is Down</font>";
} else {
$data = "<font color=green size=3>MySQL is Up</font>";
fclose($fp);
}
echo $data;
?>
<?php
$fp = fsockopen('64.92.165.74', 21,$errno,$errstr, 4);
if (!$fp){
$data = "<font color=red size=3>FTP is Down</font>";
} else {
$data = "<font color=green size=3>FTP is Up</font>";
fclose($fp);
}
echo $data;
?>