Website / Server Monitoring Script in PHP

Date March 2, 2011


Are you looking for php script that help you to monitor your server or website? I’ve written one simple script in php that can help you to monitor your website status.

<%
$servers = array("saqib-ansari.com", "google.com", "yahoo.com", "8.8.8.8");

$port = '80';

foreach ( $servers as $host )
{
	$status = fsockopen( $host, $port, $errno, $errstr, 6 );
	echo "Host $host is ";
	if ( !$check )
		echo "DOWN! n";
	else
		echo "UP! n";
}
%>

You can enhance this script as per your requirement.

Happy Server Monitor

More Free Webmaster Scripts

Related Posts

Tags: , , ,

PoorFairInterestingGoodExcellent (1 votes, average: 4.00 out of 5)
Loading ... Loading ...

Leave a Reply

 

Most Rated Posts

Subscribe to Technology Tips

Subscribe to Saqib-Ansari via RSS

Or, subscribe via email: