Свойство | Тип | Описание | |
---|---|---|---|
$connected | boolean | Connected. | |
$defautOptions | array | Default options. | |
$options | array | Options. | |
$socket | resource | Socket to the TOR server. |
Метод | Описание | |
---|---|---|
__construct ( array $options = [] ) | Creates a new instance of the controller. | |
__destruct ( ) | Destructs the instance. | |
authenticate ( ) : |
Authenticates to the Tor server. | |
connect ( ) : |
Connects to the Tor server. | |
executeCommand ( string $cmd ) : array | Executes a command on the Tor server. | |
getOption ( string $key ) : mixed | Gets an option. | |
isConnected ( ) : boolean | Gets the controller connection status. | |
quit ( ) | Closes the connection to the Tor server. | |
quote ( string $str ) : string | Quotes and escapes to use in a command. |
Метод | Описание | |
---|---|---|
checkConnected ( ) | Check if connected. | |
detectAuthMethod ( ) | Detects auth method using the PROTOCOLINFO command. |
public __construct ( array $options = [] ) | ||
$options | array | Configuration settings All settings are optional. - hostname: server to join (default: 127.0.0.1) - port: port to try (default: 9051) - authmethod: connection method (if not set will try to autodetect) Allowed values: - TorControl::AUTH_METHOD_NULL: no security - TorControl::AUTH_METHOD_HASHEDPASSWORD: password - TorControl::AUTH_METHOD_COOKIE: cookie file - password: the password (mandatory if AUTH_METHOD_HASHEDPASSWORD is used) - cookiefile: the file (if TorControl::AUTH_METHOD_COOKIE is used, if not set will autodetect) - timeout: connection timeout (default: default_socket_timeout's PHP setting) |
public authenticate ( ) : |
||
Результат |
public connect ( ) : |
||
Результат |
public executeCommand ( string $cmd ) : array | ||
$cmd | string | |
Результат | array |
public isConnected ( ) : boolean | ||
Результат | boolean |
protected static array $defautOptions | ||
Результат | array |