我正在将tor集成到我的Delphi应用程序中;整个故事is explained in this link将PHP代码移植到Delphi代码
后,我在网上搜索,然后我找到了一个代码,在PHP
function tor_new_identity($tor_ip='127.0.0.1', $control_port='9051', $auth_code=''){
$fp = fsockopen($tor_ip, $control_port, $errno, $errstr, 30);
if (!$fp) return false; //can't connect to the control port
fputs($fp, "AUTHENTICATE $auth_code\r\n");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return false; //authentication failed
//send the request to for new identity
fputs($fp, "signal NEWNYM\r\n");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return false; //signal failed
fclose($fp);
return true;
}
切换新身份的任何一个可以帮助我端起这德尔福/帕斯卡尔
我不知道任何PHP基础知识提前
感谢
问候
你的CheckOK有一个明显的错误:它被声明为Integer,但是'Result'类型(和它在TorNewIdentity中被调用的类型)是一个布尔表达式。 – 2010-10-22 20:37:18
+1因为_因为我无法阻止自己_:D – jachguate 2010-10-22 21:20:57
@梅森为我写了一个文本编辑器。谢谢! – 2010-10-23 06:54:59