2017 © Pedro Peláez
 

library php-torcontrol

Tor control library

image

dunglas/php-torcontrol

Tor control library

  • Friday, January 22, 2016
  • by dunglas
  • Repository
  • 9 Watchers
  • 65 Stars
  • 2,493 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 13 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

PHP TorControl, a library to control TOR

TorControl is a PHP library to control a Tor server., (*1)

Build Status SensioLabsInsight StyleCI, (*2)

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., (*3)

If not already done, install Composer., (*4)

Add php-torcontrol to your composer.json:, (*5)

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();

Credits

PHP TorControl has been created by Kévin Dunglas., (*6)

The Versions

22/01 2016

dev-master

9999999-dev https://dunglas.fr

Tor control library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

tor

22/01 2016

v1.0.1

1.0.1.0 https://dunglas.fr

Tor control library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

tor

20/08 2013

v1.0.0

1.0.0.0 http://dunglas.fr

Tor control library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

tor