Commit | Line | Data |
---|---|---|
b14143eb PM |
1 | <?PHP |
2 | // die on bot match | |
3 | $bot = $_SERVER['HTTP_USER_AGENT']; | |
4 | $pos = strpos($bot, 'SemrushBot'); | |
5 | if ($pos !== false) { | |
6 | die('bad robot'); | |
7 | } | |
8 | $pos = strpos($bot, 'AhrefsBot'); | |
9 | if ($pos !== false) { | |
10 | die('bad robot'); | |
11 | } | |
12 | $pos = strpos($bot, 'Slackbot'); | |
13 | if ($pos !== false) { | |
14 | die('bad robot'); | |
15 | } | |
16 | ?> |