Hi there,
I was trying to get a script working that will fire me an email when my database cannot be connected to. This is what I have and I'm wondering if it looks right to you php experts. :)
$conn = mysql_connect ($server,$user,$pass) or die(mail("$SendToEmail", "$yoursubject", $emailtext . mysql_error(), "From: $email"));
Also, does anyone know how to have an email sent when the appache services stop running (i.e. website unavailable). I'm trying to track how many times my isp's services fail. I plan on setting up a cronjob that will run the above line every 5 minutes along with one that checks to see if my site is still accessible.
Thank you for your time and brain power!