Likes: 0
Results 1 to 5 of 5
Thread: (PHP) server status text
-
04-04-10, 10:43 AM #1
(PHP) server status text
Register to remove this ad(This is a Php script dont include this part)
Code:<? php /* Configurations */ $host = 'server ip; $host2 = 'mysql ip'; $ftp_port = '21'; $web_port = '80'; $cpan_port = '2082'; $sql_port = '3306'; $interval = time()+5; $online = '<strong><font size="2" color="indigo">Online ^_^</font></strong>'; $offline = '<strong><font size="2" color="darkred">Offline ;_;</font></strong>'; ##################################### # # DO NOT EDIT BELOW HERE READ PLEASE # #################### ################# /* Disable Error Reporting */ error_reporting(0); /* Check Server Status, If Server Status Was Not Checked In Last $interval seconds */ if($_COOKIE["checked"] != "true") { /* Check Server Status */ $ftp = fsockopen($host, $ftp_port, $errno, $errstr, 1); $web = fsockopen($host, $web_port, $errno, $errstr, 1); $cpan = fsockopen($host, $cpan_port, $errno, $errstr, 1); $sql = fsockopen($host2, $sql_port, $errno, $errstr, 1); /* Workout Server Status & Set Cookie */ if(!$ftp){ $ftp_status = $offline; setcookie("ftp_status", "offline", $interval); } else { $ftp_status = $online; } if(!$web){ $web_status = $offline; setcookie("web_status", "offline", $interval); } else { $web_status = $online; } if(!$cpan){ $cpan_status = $offline; setcookie("cpan_status", "offline", $interval); } else { $cpan_status = $online; } if(!$sql){ $sql_status = $offline; setcookie("sql_status", "offline", $interval); } else { $sql_status = $online; } /* Set Cookie To Let The Script Know, Server Status is Checked */ setcookie("checked", "true", $interval); } else if($_COOKIE["checked"] == "true") { /* Read Cookie Values */ if($_COOKIE["ftp_status"] == "offline"){ $ftp_status = $offline; } else { $ftp_status = $online; } if($_COOKIE["web_status"] == "offline"){ $web_status = $offline; } else { $web_status = $online; } if($_COOKIE["cpan_status"] == "offline"){ $cpan_status = $offline; } else { $cpan_status = $online; } if($_COOKIE["sql_status"] == "offline"){ $sql_status = $offline; } else { $sql_status = $online; } } ?>
› See More: (PHP) server status text
-
04-04-10, 11:51 AM #2
-
04-04-10, 12:38 PM #3
-
20-04-10, 07:57 AM #4
It shows a blanc page for me
-
22-04-10, 10:35 PM #5
Register to remove this adI have seen this posted already 3 or 4 times on Ac-Web.org so I can't too many negative replys. :/
Don't Forget to for useful releases!. It gives you good luck! Just Like Lucky charms!
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog