www.gusucode.com > Destoon B2B仿淘宝电子商务网站 UTF8 v6.0源码程序 > destoon/file/config/robot.inc.php
<?php $ROBOT = array( 'baidu' => '百度', 'google' => 'Google', 'yahoo' => 'Yahoo', 'bing' => 'Bing', 'soso' => '搜搜', 'sogou' => '搜狗', 'other' => '其他' ); function get_robot() { if(is_robot()) { $agent = strtolower($_SERVER['HTTP_USER_AGENT']); foreach($ROBOT as $k=>$v) { if(strpos($agent, $k) !== false) return $k; } return 'other'; } return ''; } ?>