Hello can someone help me with this i want to block all useragents except one which is "Globelexic 2.7"
PHP Code
<?php
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}



![[Image: 793854efd3c9ee7d90ddd413ae9deed6.png]](https://i.gyazo.com/793854efd3c9ee7d90ddd413ae9deed6.png)