Wemall-mobile is based on the Wemall Android App Store, only need to upload the interface file in the original mall directory to complete the server configuration, the client can be customized modification. This article shares the Wemall App Store source Android Wemall App Store source robot detection, for the technician reference learning.
<?phpdefined (' Think_path ') or exit ();/** * Robot detection * @category Extend * @package Extend * @subpackage Behavior * @aut Hor liu21st <[email protected]> */class Robotcheckbehavior extends Behavior {protected $options = Arra Y (' limit_robot_visit ' = + true,//disable robot access); Public function run (& $params) {//bot access detection if (C (' limit_robot_visit ') && Self::isrobot ()) { Disable bot access to exit (' Access Denied '); }} static Private Function Isrobot () {static $_robot = null; if (Is_null ($_robot)) {$spiders = ' bot| crawl| Spider|slurp|sohu-search|lycos|robozilla '; $browsers = ' msie| netscape| opera| konqueror| Mozilla '; if (Preg_match ("/($browsers)/", $_server[' Http_user_agent '))) {$_robot = false; } elseif (Preg_match ("/($spiders)/", $_server[' Http_user_agent ')) {$_robot = true; } else {$_robot = false; }} return $_robot; }}
Wemall website Address: http://www.wemallshop.com
Original Details Address: http://Git.oschina.NET/zzunet/wemall-doraemon/commit/e8f303df5663dc69fe47bb9623222149d40e3956
Wemall doraemonandroid App Store details address: http://www.koahub.com/home/product/55
Wemall-Open Source Micro-Mall Mall Mall Source Distribution Mall B2B2C Mall system
Wemall App Store source robot detection