黑色袜子 发表于 2011-10-28 22:25:03

如何检查代理IP是否可用?又如何判断代理的延迟?

找了一天都没找到例子。
不知道AU3能不能实现。。

求解。

xms77 发表于 2011-10-28 22:30:39

Ping
--------------------------------------------------------------------------------

向指定的远程主机发送Ping命令并返回收发时间量.


Ping ( "IP地址/主机名" [, 超时时间] )




参数

IP地址/主机名 比如 "www.autoitscript.com" 或 "87.106.244.38".
超时时间 [可选参数] 等待响应的时间(以毫秒为单位,默认值为 4000毫秒).



返回值

成功: 返回收发时间间隔(大于0).
失败: 如果远程主机ping不通或者有其它网络错误则返回0,同时设置 @error 的值(请看下面的部分).

黑色袜子 发表于 2011-10-28 22:39:10

回复 2# xms77


    但是如果他的IP能通。代理的端口被他封了就连接不上了。

黑色袜子 发表于 2011-10-28 22:41:19

回复 2# xms77


    这样说可能比较好理解。就是你帮我解决了第二个问题。第一个问题还留在那里。呵呵。

my788522 发表于 2011-10-29 11:21:01

$socket = TCPConnect($g_IP ,$sock)
If $socket=-1Then
_GUICtrlRichEdit_AppendText($TXT, @CR &"         线路[" & $sock &"]△断...")
Else
_GUICtrlRichEdit_AppendText($TXT, @CR &"         线路[" & $sock &"]▲通...")
EndIf

黑色袜子 发表于 2011-10-29 20:47:13

回复 5# my788522


    不行,@error=10093

msdn说是Successful WSAStartup not yet performed.
Either the application has not called WSAStartup or WSAStartup failed. The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times.
页: [1]
查看完整版本: 如何检查代理IP是否可用?又如何判断代理的延迟?