megaads-vn/anti-crawl

Anti crawl module

dev-master 2018-01-10 04:13 UTC

This package is not auto-updated.

Last update: 2024-12-12 00:33:04 UTC


README

require redis This package use https://github.com/nicolasff/phpredis PHP extension, please make sure this is installed before continuing. ##Installation:

composer require megaads-vn/anti-crawl

###OR add in file composer.json

"require": {
	"megaads-vn/anti-crawl":"dev-master"
}

config for yii1

    'components' => array(
        "antiCrawl"=>array(
            "class" => "application.vendor.megaads-vn.anti-crawl.src.RequestLimits",
	    "hostname" => "127.0.0.1",
            "port" => 6379,
            "database" => 1,
            "prefix" => "Yii.redis."
        )
    )

use for yii1

$isOk = Yii::app()->antiCrawl->check();