Advertisement
Guest User

Untitled

a guest
May 1st, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. // Daniel's robot detector
  2. $status = true;
  3.  
  4. if (isset($this->request->server['HTTP_USER_AGENT'])) {
  5. $robots = explode("\n", trim($this->config->get('config_robots')));
  6.  
  7. foreach ($robots as $robot) {
  8. if (strpos($this->request->server['HTTP_USER_AGENT'], trim($robot)) !== false) {
  9. $status = false;
  10.  
  11. break;
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement