Not correct determined User-Agent search-engine bots #298

Closed
anatooly opened this Issue Aug 25, 2011 · 3 comments

Projects

None yet

3 participants

@anatooly
  1. If we have Google bot header: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
  2. In /system/libraries/User_agent.php at function _compile_data() use only function _set_browser than view Mozilla and break
  3. We have browser Mozilla, but this not right, we must have bot Google

Sorry that my english.

@anatooly
anatooly commented Sep 7, 2011

I mean correct work function user_agent library:
$this->agent->robot() and $this->agent->is_robot()

@swampthang

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
$this->agent->is_browser()
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.

@narfbg
Contributor
narfbg commented Jun 19, 2012

Just tested - this user agent string is detected as "Googlebot" in the current develop branch.

@narfbg narfbg closed this Jun 19, 2012
@sviande sviande pushed a commit to sviande/CodeIgniter that referenced this issue Jan 3, 2014
Phil Sturgeon Issue #298: $this->table->function = can now accept an array with a v…
…alid callback which is passed to call_user_func().
3fc0cc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment