HoneyPot extension for Yii 1.1 Framework.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist foodette/yii1-honeypot "*"
or add
"foodette/yii1-honeypot": "*"
to the require section of your composer.json
file.
Instantiate a HttpBlackList
object with your access key
use foodette\extension\yii1-honeypot
$httpBL = new HttpBlackList('youraccesskey');
The check
method will return a boolean indicating wether the IP address is known to have suspicious activity.
$httpBL->check('1.2.3.4');
// returns true|false
The query
method will return an array with details about suspicious activity
$httpBL->check('1.2.3.4');
returns [] when IP is ok
returns [
'lastActivity' => 12 // number of days since last activity
'threatScore' => 39 // threat score on a 0-100 scale
'type' => 1 // visitor type bit, e.g. Suspicious|Harvester|Comment spam
] when IP is known to have suspicious activity
See the Project Honey Pot API for more information.