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. onlinesid/tor-detector

ActiveLibrary

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 1mo 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

3501d 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

[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6076.7M435](/packages/shipmonk-composer-dependency-analyser)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[landrok/language-detector

A fast and reliable PHP library for detecting languages

132647.0k3](/packages/landrok-language-detector)[googlei18n/myanmar-tools

Zawgyi and Unicode Font Detector using Markov Model (Machine Learning)

26125.8k1](/packages/googlei18n-myanmar-tools)[nitotm/efficient-language-detector

Fast and accurate natural language detection. Detector written in PHP. Nito-ELD, ELD.

59252.9k6](/packages/nitotm-efficient-language-detector)[tivie/php-os-detector

A small utility library that detects the OS the server is running on

201.6M11](/packages/tivie-php-os-detector)

PHPackages © 2026

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