icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Site Status Check

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old July 18th, 2004, 3:08 AM   #1 (permalink)
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
Site Status Check

Guys could you have a look at this and tell me what you think:

http://www.ancyru.net/?x=status

Code is:

Code:
<?php

error_reporting(0);

function lookup_ports($hport,$who) {
	$fp = fsockopen($who, $hport,$errno,$errstr, 4);
	if (!$fp) {
		$data = "<span style=\"color: red;\">".Down."</span>";
	} else {
		$data = "<span style=\"color: green;\">".Up."</span>";
		fclose($fp);
	}
	return $data;
}

$domain = ($domain) ? strip_tags($domain) : str_replace("www.","",$HTTP_SERVER_VARS["HTTP_HOST"]) ;

echo "<table style=\"text-align: center;\" width=\"100%\">";
echo "<tr>";
echo "<td align=\"left\"><strong>Server</strong></td>";
echo "<td><strong>HTTP</strong></td>";
echo "<td><strong>HTTPS</strong></td>";
echo "<td><strong>FTP</strong></td>";
echo "<td><strong>SSH</strong></td>";
echo "<td><strong>SMTP</strong></td>";
echo "<td><strong>POP</strong></td>";
echo "<td><strong>MySQL</strong></td>";
echo "</tr>";

echo "<tr>";
echo "<td align=\"left\"><a href=\"http://$domain\" target=\"_blank\">$domain</a></td>";
echo "<td><strong>".lookup_ports("80",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("443",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("21",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("22",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("25",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("110",$domain)."</strong></td>";
echo "<td><strong>".lookup_ports("3306",$domain)."</strong></td>";
echo "</tr>";
echo "</table>";

?>
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.

Last edited by Ancyru; August 3rd, 2004 at 8:51 AM..
Ancyru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 6:16 AM   #2 (permalink)
Hostering?
Excelling Contributor
 
mobius's Avatar
 
Joined in Jan 2004
Lives in New York
Hosted on D41
970 posts
Gave thanks: 0
Thanked 0 times
With a little formatting, thats excellent! Thanks you! :maitre:
__________________
{_DIME.41 Reseller_}

Stay cool.

>> Avatar used with permission from garyzullo.com <<
mobius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 7:33 AM   #3 (permalink)
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
Ah it's on basic layout atm, I'm just checking to see if the script is okay.

Thanks for the comment mobius.
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.
Ancyru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 8:03 AM   #4 (permalink)
Hostering?
Excelling Contributor
 
mobius's Avatar
 
Joined in Jan 2004
Lives in New York
Hosted on D41
970 posts
Gave thanks: 0
Thanked 0 times
I know its a basic layout, but it still is :1openarms
__________________
{_DIME.41 Reseller_}

Stay cool.

>> Avatar used with permission from garyzullo.com <<
mobius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 12:13 PM   #5 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,394 posts
Gave thanks: 28
Thanked 94 times
Quote:
Originally Posted by mobius
I know its a basic layout, but it still is :1openarms
Very Good! Can I steal it?
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 12:47 PM   #6 (permalink)
Hostering?
Excelling Contributor
 
mobius's Avatar
 
Joined in Jan 2004
Lives in New York
Hosted on D41
970 posts
Gave thanks: 0
Thanked 0 times
:lol3:
__________________
{_DIME.41 Reseller_}

Stay cool.

>> Avatar used with permission from garyzullo.com <<
mobius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 9:18 PM   #7 (permalink)
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
No! They're all mine!

Haha nah go ahead use it if you please.
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.

Last edited by Ancyru; June 1st, 2005 at 6:11 AM..
Ancyru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2004, 9:39 PM   #8 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,394 posts
Gave thanks: 28
Thanked 94 times
Quote:
Originally Posted by Ancyru
No! They're all mine!

Haha nah go ahead use it if you please.
Thanks!
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!

Last edited by Ancyru; June 1st, 2005 at 6:12 AM..
Bigjohn is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 19th, 2004, 3:47 AM   #9 (permalink)
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
I was wondering, is this how Surpass did it?
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.
Ancyru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On