Experts Exchange connects you with the people and services you need so you can get back to work.
<?php // RAY_bad_robots.php
// USE CASE:
echo "YOU ARE A BOT";
echo "YOU ARE NOT A BOT";
// A FUNCTION TO IDENTIFY THE BOTS
// THE BOTS WE WANT TO IGNORE
, 'Ask Jeeves'
// COMPARE THE BOT STRINGS TO THE USER AGENT STRING
foreach ($bad_robots as $spider)
$spider = '#' . $spider . '#i';
if (preg_match($spider, $_SERVER["HTTP_USER_AGENT"])) return TRUE;
Open in new window
Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $95.20.
Premium members get this course for $389.00.
Premium members get this course for $31.25.
Premium members get this course for $122.40.
Premium members get this course for $151.20.