onlinesid/tor-detector
Composer 安装命令:
composer require onlinesid/tor-detector
包简介
Tor Detector - a library to detect if your website visitor is using TOR
关键字:
README 文档
README
A library to detect if your website visitor is from a TOR network or not.
At the moment this is achieved by using a DNS lookup method as described in https://trac.torproject.org/projects/tor/wiki/doc/TorDNSExitList
Composer
https://packagist.org/packages/onlinesid/tor-detector
Usage
$tor_detector = new OnlineSid\Tor\TorDetector(); $your_server_ip = '1.2.3.4'; // the IP address of your server (web server) $user_ip = '62.102.148.67'; // is this IP from TOR exit node? if ($tor_detector->check($user_ip, 80, $your_server_ip)) { echo "Tor!\n"; } else { echo "Not TOR!\n"; }
Credit
Original code is taken from https://jrnv.nl/detecting-the-use-of-proxies-and-tor-network-6c240d6cc5f (it wasn't working but very close)
统计信息
- 总下载量: 213
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-09