Skip to content

mathzol/phptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

PHPTor

This is a quick work PHP client for Tor. With this class you can connect, disconnect and get new identity from Tor. For more information please checkout the code, it's pretty simple.

Example code

Connect to Tor and send request:

$tor = new PHPTor();
$tor->torConnection();
$tor->request('http://google.com');

Get new identity and send request again, this time from an other IP:

$tor->newIdentity();
$tor->request('http://google.com');

Close connection with Tor and send request from our real IP:

$tor->torDisconnection();
$tor->request('http://google.com');