项目作者: licvido

项目描述 :
Checks if given IP is coming from Tor (exit) node.
高级语言: PHP
项目地址: git://github.com/licvido/tor-ip-checker.git
创建时间: 2017-06-09T20:29:03Z
项目社区:https://github.com/licvido/tor-ip-checker

开源协议:MIT License

下载


Tor IP Checker

Checks if given IP is coming from Tor (exit) node.

Installation

The best way to install Tor IP Checker is using Composer:

  1. $ composer require licvido/tor-ip-checker

Usage

  1. // prepare required list
  2. $exitNodeList = new ExitNodeList;
  3. $fullNodeList = new FullNodeList;
  4. $checker = new TorIpChecker($exitNodeList);
  5. if ($checker->isInList($_SERVER['REMOTE_ADDR'])) {
  6. // TOR
  7. } else {
  8. // standard way
  9. }

License

This library is licensed under the MIT License - see the LICENSE.md file for details.