Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 609 Bytes

File metadata and controls

24 lines (22 loc) · 609 Bytes

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