PHPackages                             onlinesid/tor-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. onlinesid/tor-detector

ActiveLibrary[Security](/categories/security)

onlinesid/tor-detector
======================

Tor Detector - a library to detect if your website visitor is using TOR

v0.0.2(9y ago)122122[1 issues](https://github.com/onlinesid/tor-detector/issues)MITPHP

Since Oct 8Pushed 9y ago2 watchersCompare

[ Source](https://github.com/onlinesid/tor-detector)[ Packagist](https://packagist.org/packages/onlinesid/tor-detector)[ Docs](https://github.com/onlinesid/tor-detector)[ RSS](/packages/onlinesid-tor-detector/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Tor Detector PHP library
========================

[](#tor-detector-php-library)

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

Composer
--------

[](#composer)

Usage
-----

[](#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
------

[](#credit)

Original code is taken from  (it wasn't working but very close)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8938cbf4c5b34440ebf00efd7786f01134da5e6820fe1631bd11020bb2e5df5b?d=identicon)[onlinesid](/maintainers/onlinesid)

---

Top Contributors

[![onlinesid](https://avatars.githubusercontent.com/u/99542?v=4)](https://github.com/onlinesid "onlinesid (2 commits)")

---

Tags

detectortortor browser

### Embed Badge

![Health badge](/badges/onlinesid-tor-detector/health.svg)

```
[![Health](https://phpackages.com/badges/onlinesid-tor-detector/health.svg)](https://phpackages.com/packages/onlinesid-tor-detector)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
