Can I..?

Status
Not open for further replies.

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?
 

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
But if the free server is down... there's no point, your site wont be able to be accessed anyway!
 

DecemberGuild

New Member
Messages
107
Reaction score
0
Points
0
But if only the MySQL and FTP are down, but the HTTP is up, then can't it be accessed? That's why I didn't say "and HTTP status."
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Here would the code for text be

MySQL:

PHP:
<?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;

?>

FTP:

PHP:
<?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;

?>
 
Status
Not open for further replies.
Top