Sorry that my english.
I mean correct work function user_agent library:
$this->agent->robot() and $this->agent->is_robot()
I created a site that requires users to log in prior to entering the site but am using the User_Agent library to allow robots through to index the site. I noticed that Google was not being detected as a robot. In fact, when echoing
I get nothing - neither TRUE ot FALSE. I used Firefox's User Agent plugin and set it to GoogleBot and a few others. Still no value at all when echoing it out. I decided to include my own script that uses stristr to look in the $_SERVER['HTTP_USER_AGENT'] string for 'Googlebot' and it works fine. Not sure why the CI user agent is returning nothing.
Just tested - this user agent string is detected as "Googlebot" in the current develop branch.
Issue #298: $this->table->function = can now accept an array with a v…
…alid callback which is passed to call_user_func().