: If you want is just a one off notification, you could do something like add a small notifier for the page. I do that sometimes but usually shut it off soon after, because it can generate
If you want is just a one off notification, you could do something like add a small notifier for the page. I do that sometimes but usually shut it off soon after, because it can generate a pile of email. Use sparingly.
You specifically mentioned PHP, so I'm including code:
<?php
// add ip addresses you don't care about here
$no_mail = array(
'24.254.148.80',
'67.145.115.105',
'207.46.149.50',
);
$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI';
$to_email = 'me@example.com';
if (!in_array($_SERVER['REMOTE_ADDR'], $no_mail)):
$body = $url . "nn". print_r($_SERVER, true);
$headers = 'From: webmaster@example.com' . "n" .
'Reply-To: webmaster@example.com' . "n" .
'X-Mailer: PHP/' . phpversion() . "n";
mail($to_email,
'Email from '. url . $_SERVER['REMOTE_ADDR'],
$body
, $headers) or die("<!-- error with email -->");
print "<!-- notification sent -->";
else:
print "<!-- no notification sent -->";
endif;
?>
This is in no way a comprehensive solution. You could so a similar thing by just running a tail on your logs and grepping for information about the pages you care about.
More posts by @Dunderdale272
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.