PHPackages                             pxgamer/dht-search - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pxgamer/dht-search

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pxgamer/dht-search
==================

A collection of tools for searching DHT via PHP.

v1.0.0(8y ago)514MITPHPPHP ^7.1

Since Dec 6Pushed 6y ago2 watchersCompare

[ Source](https://github.com/owenvoke/dht-search)[ Packagist](https://packagist.org/packages/pxgamer/dht-search)[ RSS](/packages/pxgamer-dht-search/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

dht-search
==========

[](#dht-search)

[![Latest Version on Packagist](https://camo.githubusercontent.com/95d1a1e1ddc3a6b77699ac5d99cb6007acf9445e4590aa5e171b221fbc42589b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707867616d65722f6468742d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pxgamer/dht-search)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/45b3a81acc59f6b9e24634291742666cb84086c3f67d5734c8d97fe302b68d9a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f707867616d65722f6468742d7365617263682f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/pxgamer/dht-search)[![Style CI](https://camo.githubusercontent.com/fec0b87ff1b7184d9128f49e4a6964fdbd1ae0e748141b143a50d75ede19c573/68747470733a2f2f7374796c6563692e696f2f7265706f732f38373833323737372f736869656c64)](https://styleci.io/repos/87832777)[![Code Coverage](https://camo.githubusercontent.com/c43021b94015dbaa20d54f6b409b0032ebf0c712e658341b26b213cd4358c881/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f707867616d65722f6468742d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/pxgamer/dht-search)[![Total Downloads](https://camo.githubusercontent.com/f3f1a308bf5aca6e1261038184aeb911484a966314f04136b8cfaefb26770805/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f707867616d65722f6468742d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pxgamer/dht-search)

A collection of tools for searching DHT via PHP.

Structure
---------

[](#structure)

```
src/
tests/
vendor/

```

Install
-------

[](#install)

Via Composer

```
$ composer require pxgamer/dht
```

Usage
-----

[](#usage)

```
$serv = null;

$this->node_id = Base::get_node_id();

$table = array();

$last_find = time();

$threads = [];

Logger::write(date('Y-m-d H:i:s', time()) . " - Starting service...\n");

$serv = new swoole_server('0.0.0.0', 6882, SWOOLE_PROCESS, SWOOLE_SOCK_UDP);
$serv->set(array(
    'worker_num' => WORKER_NUM,
    'daemonize' => false,
    'max_request' => MAX_REQUEST,
    'dispatch_mode' => 2,
    'log_file' => ABSPATH . '/error.log'
));
$serv->on('WorkerStart', function ($serv, $worker_id) {
    swoole_timer_tick(AUTO_FIND_TIME, 'timer');
    auto_find_node();
});
$serv->on('Receive', function ($serv, $fd, $from_id, $data) {

    if (strlen($data) == 0) {
        return false;
    }

    $msg = Base::decode($data);
    if (empty($msg['y'])) {
        return false;
    }

    $fdinfo = $serv->connection_info($fd, $from_id);
    if (empty($fdinfo['remote_ip'])) {
        return false;
    }

    if ($msg['y'] == 'r') {

        if (array_key_exists('nodes', $msg['r'])) {
            Response::action($msg, array($fdinfo['remote_ip'], $fdinfo['remote_port']));
        }
    } elseif ($msg['y'] == 'q') {

        Request::action($msg, array($fdinfo['remote_ip'], $fdinfo['remote_port']));
    } else {
        return false;
    }
});

$serv->start();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [pxgamer](https://github.com/pxgamer)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

3079d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1899334?v=4)[Owen Voke](/maintainers/owenvoke)[@owenvoke](https://github.com/owenvoke)

---

Top Contributors

[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (16 commits)")

---

Tags

dhtphp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/pxgamer-dht-search/health.svg)

```
[![Health](https://phpackages.com/badges/pxgamer-dht-search/health.svg)](https://phpackages.com/packages/pxgamer-dht-search)
```

###  Alternatives

[fojuth/readmegen

Readme file / doc generator. It uses VCS logs as a source of information.

6230.7k](/packages/fojuth-readmegen)[fintara/calculator-php

Calculator for arithmetic expressions

1331.2k](/packages/fintara-calculator-php)

PHPackages © 2026

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