Advertisement
Guest User

Untitled

a guest
Apr 6th, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. # определение робота (краулера)
  2. private function set_robot()
  3. {if (is_array($this->robots) AND count($this->robots) > 0)
  4. {foreach ($this->robots as $key => $val)
  5. {if (preg_match("|".preg_quote($key)."|i", $this->agent))
  6. {$this->is_robot=TRUE; $this->robot=$val;return TRUE;}}}
  7. return FALSE;}
  8. #Вывод
  9. echo $AboutGuest->robot;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement