SpiderCheck

Description

Tries to determine whether or not the current user is a search engine spider

Syntax

int SpiderCheck ()



Return value

Expected type: Integer
Description: Returns either the ID of the spider that this user appears to be, 0 if they don't appear to be a spider or false if no spiders exist in the DB


Notes

  • Un-sets $_SESSION['id_robot'] if it's set
  • Sets the robot_check session variable to the current timestamp
  • Pulls current spider info from the database and caches it if $spider_data isn't set or is null
  • Returns false if no spiders exist in the database
  • Sets $_SESSION['id_robot'] again if the user appears to be a spider
Advertisement: