Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/megaads-vn/anti-crawl

A PHP package to prevent bot from crawling
https://github.com/megaads-vn/anti-crawl

Last synced: 10 days ago
JSON representation

A PHP package to prevent bot from crawling

Awesome Lists containing this project

README

        

# php anti crawl
require redis
This package use https://github.com/nicolasff/phpredis PHP extension, please make sure this is installed before continuing.
##Installation:
```javascript
composer require megaads-vn/anti-crawl
```
###OR
**add in file composer.json**
```javascript
"require": {
"megaads-vn/anti-crawl":"dev-master"
}
```
config for yii1
```javascript
'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
```javascript
$isOk = Yii::app()->antiCrawl->check();
```