I'm using Tor with PHP, for now, everything is working properly. But, when I try to start Tor from php it'll sometimes throw an error becuase Tor is currently running, so i've been wondering if there is any method to check Tor's status(running or not)
I can only use SOCKS5 protocol or Linux CLI; these are my only options.
Note: This functions connects to Tor(it works).
function init()
{
//Connect to Tor
$socket = fsockopen($this->proxyIp, $this->proxyPort);
fwrite($socket, 'AUTHENTICATE' . PHP_EOL);
}