找回密码
 加入
搜索
查看: 3316|回复: 5

[系统综合] 如何检查代理IP是否可用?又如何判断代理的延迟?

[复制链接]
发表于 2011-10-28 22:25:03 | 显示全部楼层 |阅读模式
找了一天都没找到例子。
不知道AU3能不能实现。。

求解。
发表于 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


    这样说可能比较好理解。就是你帮我解决了第二个问题。第一个问题还留在那里。呵呵。
发表于 2011-10-29 11:21:01 | 显示全部楼层
$socket = TCPConnect($g_IP ,$sock)
If $socket=-1  Then
_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.
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-5 07:12 , Processed in 0.085954 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表