Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Bot-detection Script by Christopher Mills - www.imod.co.za
- $to = ""; // insert receiving email address
- $from = ""; // insert sending email address
- $body = "";
- $bots = array('Googlebot', 'Yahoo', 'MSN'); //add the bots you want
- foreach ($bots as $bot)
- {
- if (eregi($bot, $_SERVER['HTTP_USER_AGENT']))
- {
- $subject = "BOT DETECTED: " . $_SERVER['HTTP_USER_AGENT'];
- if (mail($to, $subject, $body, $from))
- {
- // nudda
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement