Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $bot = 'bot';
- $bot2 = 'Yandex|Googlebot|slurp|yahoo|Teoma|Scooter|ia_archiver|Lycos|Rambler|Mail.Ru|Aport|WebAlta|ezooms|nigma|bingbot|Twitterbot';
- $bot3 = 'Gigabot|trendictionbot|msnbot|jeeves|webcrawler|turnitinbot|technorati|findexa|findlinks|gaisbo|zyborg|surveybot|bloglines|blogsearch|pubsub|syndic8|userland|become.com';
- if( preg_match("~$bot|$bot2~i", $_SERVER['HTTP_USER_AGENT']) ) {
- wp_send_json(array('error' => 'BOT'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement