gared / tor-directory-client
Client to request tor directory data
0.1
2022-03-21 21:21 UTC
Requires
- php: >=7.4
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- symfony/polyfill-php80: ^1
Requires (Dev)
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- phpunit/phpunit: ^9.5
README
Use this PHP library to request tor directory information
Installation
Use composer
composer require gared/tor-directory-client
Getting started
Usage
$client = new \Gared\TorDirectoryClient\Client(); $serverDescriptor = $client->getServerDescriptor('FINGERPRINTABC'); // get consensus data $routerDescriptors = $client->getConsensus(); // get consensus data $votes = $client->getAllVotes(); foreach ($votes as $vote) { foreach ($vote as $routerDescriptor) { echo $routerDescriptor->getFingerprint(); } }
Supported Platforms
- You need at least PHP 7.4