Detecting Bot using Codeigniter |
I don't believe so. The only way really to detect would be the visitors (bot) IP and/or user agent string, both of which can easily be changed and are unreliable. If you have some pages that shouldn't be visible by someone (anyone), they should be behind a login, otherwise everything is considered public. What are you trying to prevent bots from seeing?
For bots which are behaving properly, you can use the user_agent library:
http://www.codeigniter.com/user_guide/li...::is_robot $this->agent->is_robot() or $this->agent->is_robot('name_of_bot') As already mentioned, though, when someone wants to create a bot which misbehaves, more than likely they're going to make it difficult for you to detect that bot, as well. |
Welcome Guest, Not a member yet? Register Sign In |