Get support for dunglas/php-torcontrol
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
dunglas/php-torcontrol
PHP TorControl, a library to control TOR
TorControl is a PHP library to control a Tor server.
Features
- Connect to a Tor server through network socket, SSL network socket or UNIX socket
- Support null, password and cookie file authentication methods
- Automatic authentication for null and cookie file methods
- Multi-line replies
- Unit-tested with PHPUnit
- Installation with Composer
Installation
Note: if you use the Symfony framework, you should use DunglasTorControlBundle.
If not already done, install Composer.
Add php-torcontrol to your composer.json
:
composer require dunglas/php-torcontrol
Usage
<?php
// Autoloading using composer
require 'vendor/autoload.php';
// Connect to the TOR server using password authentication
$tc = new TorControl\TorControl(
array(
'hostname' => 'localhost',
'port' => 9051,
'password' => 'MySecr3tPassw0rd',
'authmethod' => 1
)
);
$tc->connect();
$tc->authenticate();
// Renew identity
$res = $tc->executeCommand('SIGNAL NEWNYM');
// Echo the server reply code and message
echo $res[0]['code'].': '.$res[0]['message'];
// Quit
$tc->quit();
Related
Credits
PHP TorControl has been created by Kévin Dunglas.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2