用VB如何做个代理服务器检测程序

2025-02-28 03:45:40
推荐回答(1个)
回答1:

可以用Inet控件来实现:思路,让Inet用代理访问百度并获取源代码,如果能从源代码找到百度之类的字眼就可以了。
方法:
工程-添加部件-找到microsoft internet transfer control 6.0
private sub form_load()
inet1.Proxy="192.168.1.100:3128"
dim temp as string
temp=inet1.openurl("www.baidu.com")
if instr(temp,"百度")>0 then
'有效
else
'无效
end if
end sub