PHP coder needs Tor details

Mr. Blue trashdsfg at
Wed Feb 14 01:49:52 UTC 2007

Hey Crew.

Thanks to all for your help.

First for all I would like to say that this file.php(which is manipulating Tor) will be located in admin area ONLY and will be intended for use ONLY by admin.
Admin area is protected by Apache pass authentication (Digest) over SSL and after that is passed, admin must enter another login password to enter admin area.

Only admin will use it - NOT publicly available to users!

Firstly I need to issue to shell, from PHP, command that will start Tor.
Regarding that command...
It will have ALL directives that should "normally" be located in torrc, but there is no torrc, nor I have intention to use it.
So command is:
tor -gid $gid -pidfile $pidfile -RunAsDaemon $b -user $uid -ClientOnly 1 -EntryNodes $nickname, -ExitNodes $nickname -StrictExitNodes 1 -NewCircuitPeriod 3600 -
Regarding nodes....
Entry and exit nodes will be same.

Before I continue I would like to say that I have made a PHP script that is utilizing regular expresions and harvesting all exit nodes in a list of IP addresses from moria dirs.
So I would like to pull from my database IP of a node(NOT nickname) and put it in a $nickname variable.
Will this work? Can I select node by IP and NOT by nickname?

Also when that will be achived I am going to use PHP cURL and connect with it to using SOCKS5 protocol - then do request to some page on the internet and finaly use POSIX - posix_kill($pidfile, SIGTERM); php function to shutdown Tor, alternatively use kill to which I pass $pidfile, all in shell.

Now someone will say that I should connect to Tor using SOCKS4a and am I normall to use ONLY 1 node which will be entry and exit at the same time.
Be sure that I am VERY aware of my actions - but I am not here because I don't wana be tracked and because I want to surf anonimously.

Now here we come to the bigest obstacle for me.(oh men, soon as I finish this script I am going to read FreeBSD book that I just got and learn that UNIX at once!)
Creating a valid shell command:
 tor -gid $gid -pidfile $pidfile -RunAsDaemon $b -user $uid -ClientOnly 1 -EntryNodes $nickname, -ExitNodes $nickname -StrictExitNodes 1 -NewCircuitPeriod 3600 -
User nobody will run it.
 - Should I exlude "-gid $gid" part?
 - Should $b variable be 0 OR 1 (that is..., should I run it as deamon?)
 - Should I exlude "-user $uid" part?
 - What about $nickname? Can I pass it IP of a node?
 - What should I put in a $pidfile variable?!? - I never saw one (number or letters?) It will also be used for shuting down Tor at the end of a process...

Also I just rememberd something...
Whan tor was already runnig(started by root) I was able to utilize connection trough it by nobody, but when I attempted shutdown I got message that there was no process with pid belonging to it - or something similar - so that explains all.

Thank in advance...

Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the tor-talk mailing list