#native_company# #native_desc#

Simply Web monitoring

By Jeff Espiritu
on 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 http://smallcapitalbusiness.com

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
$fromEmail="[email protected]";

//******** 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.
$toEmail="[email protected]";

//******** 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.0rn";
$mailheaders .= "Content-type: text/html; charset=iso-8859-1rn";
$mailheaders .= "From: $fromn";
$mailheaders .= "Reply-To: $fromn";

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