PHPBuilder - Simply Web monitoring

RSS Twitter

Simply Web monitoring

by: Jeff Espiritu
October 26, 2004

Version: 1

Type: Full Script

Category: HTTP

License: GNU General Public License

Description: You can monitor your website downtime status including SMTP, POP, FTP and SSH. and automatically send alert to the assigned email in the config.php.

Created by

Other Scripts we made:
 - Traffic Exchange Link (The New Generation)
 - Simply FAQ Script
 - Write Text to the Image
 - Image Resizer
 - Simple Web Monitoring
 - Capture TGP New listing
 - Exit Popup Exchange Service
 - Domain Redirection Service
 - TGP or Thumbnail Gallery Post

GNU : Do not remove our signature at the bottom page

//******** From Email, enter your email here

//******** Website to monitor without http://www.

//******** Type the emails to send the down time alert, you can use comma (,) to seperate multiple emails
//******** Do not use the email of the website that you are monitoring, because if its down then the email is down as well.

//******** The Subject of the email once send you an alert. 
$subject="Monitoring Alert";



function checkit($link,$port)
         for ($a=0;$a<=$packs;$a++)
             $url = @fsockopen(server($link), $port, &$errno, &$errstr, 5);
             if (!$url) {$rturn=FALSE; break;}
         return $rturn;

function server($link){
         if(strstr($link,"/")){$link = substr($link, 0, strpos($link, "/"));}
         return $link;

if(!checkit("$websiteURL",80)) $content.="Website, ";
if(!checkit($websiteURL,25)) $content.="SMTP, ";
if(!checkit($websiteURL,21)) $content.="FTP, ";
if(!checkit($websiteURL,110)) $content.="POP3, ";
if(!checkit($websiteURL,22)) $content.="SSH";

$content="Site $websiteURL problem in ".$content.".  Time occured ".date("m-d-Y h:i a");
$mailheaders  = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
$mailheaders .= "From: $from\n";
$mailheaders .= "Reply-To: $from\n";

mail("$toEmail","$subject",$content, $mailheaders);


Comment and Contribute

Your comment has been submitted and is pending approval.

Jeff Espiritu



(Maximum characters: 1200). You have characters left.