Wemall App Store source robot detection

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.