Checks if given IP is coming from Tor (exit) node.
Checks if given IP is coming from Tor (exit) node.
The best way to install Tor IP Checker is using Composer:
$ composer require licvido/tor-ip-checker
// prepare required list
$exitNodeList = new ExitNodeList;
$fullNodeList = new FullNodeList;
$checker = new TorIpChecker($exitNodeList);
if ($checker->isInList($_SERVER['REMOTE_ADDR'])) {
// TOR
} else {
// standard way
}
This library is licensed under the MIT License - see the LICENSE.md file for details.