ajetrumpet Posted March 5, 2021 Share Posted March 5, 2021 if I have a list of 5,000 bots and their server header into in my DBs, can someone point me to a web resource that can give me any insight into how to show a custom page if a bot is detected at the render request? I can look up PHP functions myself and possibly use header(), but didn’t know if anything special was involved that I don’t already know about. so, say for instance, as a joke I want to do this: <?php $ip = gethostbyaddr($_SERVER['REMOTE_ADDR']); if (substr($ip, 0, 3) = '10.') { echo 'sorry, but we do not display content to USA government's automated server sniffing bots.'; } ?> how much of a pain in the rear would it be to display custom pages for ‘‘x’’ number of automated hits? I realize that this is pointless because most are just from researching orgs the world over, but it IS a relevant question to ask. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/312250-custom-pages-for-bots-detected-from-dbs/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.