Automatic Email Notification if any errors arise

Permalink 1 user found helpful
Some code to help with concrete:

defined('C5_EXECUTE') or die(mail("username@address.com", "Houston we have a problem", 
         "An error has been detected on page : " . $_SERVER['REQUEST_URI'] .
         "\n\nThe following has also been supplied:\nHostname : " . $_SERVER['SERVER_NAME'] .
         "\n\n IP Address : " . $_SERVER['SERVER_ADDR'] . 
         "\n\n CGI Version : " . $_SERVER['GATEWAY_INTERFACE'] . 
         "\n\n Header Software Response : " . $_SERVER['SERVER_SOFTWARE'] . 
         "\n\n Information Protocol : " . $_SERVER['SERVER_PROTOCOL'] . 
         "\n\n Request Method : " . $_SERVER['REQUEST_METHOD'] . 
         "\n\n Time of Error : " . $_SERVER['REQUEST_TIME'] . 
         "\n\n Document Root : " . $_SERVER['DOCUMENT_ROOT'] . 
         "\n\n Language : " . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . 
         "\n\n Connection Type : " . $_SERVER['HTTP_CONNECTION'] . 
         "\n\n The Users Port : " . $_SERVER['REMOTE_PORT'] .
         "\n\n Script Location : " . $_SERVER['SCRIPT_FILENAME'] . 
         "\n\n Server Administrator Contact Email Address : " . $_SERVER['SERVER_ADMIN'] .

 
benjoe replied on at Permalink Reply
benjoe
Where to put this code? sir? thanks so much..

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.