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