Changeset 1552 in ExiteCMS for trunk/includes/user_functions.php
- Timestamp:
- 07/28/08 11:06:51 (4 years ago)
- File:
-
- 1 edited
-
trunk/includes/user_functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/user_functions.php
r1548 r1552 25 25 } 26 26 27 // check for bot users 28 $_bot_list = array("Teoma", "alexa", "froogle", "Gigabot", "inktomi","looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory","Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot","crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp","msnbot", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz","Baiduspider", "Feedfetcher-Google", "TechnoratiSnoop", "Rankivabot","Mediapartners-Google", "Sogou web spider", "WebAlta Crawler"); 29 foreach($_bot_list as $bot) { 30 if(ereg($bot, $_SERVER['HTTP_USER_AGENT'])) { 31 define("CMS_IS_BOT", true); 32 break; 33 } 34 } 35 if (!defined("CMS_IS_BOT")) { 36 define("CMS_IS_BOT", false); 37 } 38 unset($_bot_list); 39 27 40 // Set the users site_visited cookie if this is the first visit, and update the unique visit counter 28 41 // save the random site_visited value, we need that later in session management! 29 if (! isset($_COOKIE['site_visited'])) {42 if (!CMS_IS_BOT && !isset($_COOKIE['site_visited'])) { 30 43 $result=dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = cfg_value+1 WHERE cfg_name = 'counter'"); 31 44 $site_visited = md5(uniqid(rand(), true));
Note: See TracChangeset
for help on using the changeset viewer.
