国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > 綜合 > 正文

使用VB實(shí)現(xiàn)郵箱自動(dòng)注冊(二):修改代理服務(wù)器

2024-07-21 02:20:47
字體:
供稿:網(wǎng)友
如果一個(gè)ip在一段時(shí)間過多的注冊,則該ip會(huì)被封調(diào),一個(gè)辦法就是修改注冊表以修改代理服務(wù)器。在這里我使用一個(gè)api函數(shù)internetsetoption,使用之前要添加一個(gè)模塊,然后加入如下代碼:

public const internet_option_proxy = 38

public const internet_open_type_proxy = 3

public const internet_option_settings_changed = 39

type internet_proxy_info

dwaccesstype as long

lpszproxy as string

lpszproxybypass as string

end type



public declare function internetsetoption lib "wininet.dll" _

alias "internetsetoptiona" _

(byval hinternet as long, _

byval dwoption as long, _

byref lpbuffer as any, _

byval dwbufferlength as long) as long

改代碼定義了三個(gè)常數(shù)和一個(gè)結(jié)構(gòu),該api函數(shù)的具體用法請大家查詢msdn。vb修改注冊表的辦法就太多了,我就不多說了。在webbrowser1_documentcomplete事件中在添加一個(gè)條件語句,用以判斷是否是ip被封的提示頁面,代碼如下:

if instr(doc.body.innertext, "ip地址在這一段時(shí)間內(nèi)已經(jīng)注冊了太多的用戶") > 0 then

dim options as internet_proxy_info

options.dwaccesstype = internet_open_type_proxy

options.lpszproxy = "168.10.46.77:80"

options.lpszproxybypass = ""

internetsetoption 0, internet_option_proxy, options, lenb(options)

dim don as double

dim doff as double

set reg = createobject("wscript.shell")

a = reg.regwrite("hkey_current_user/software/microsoft/windows/currentversion/internet settings/proxyserver", _

"211.144.96.250:80")

a = reg.regwrite("hkey_current_user/software/microsoft/windows/currentversion/internet settings/proxyenable", _

1)

internetsetoption 0, internet_option_settings_changed, 0, 0

webbrowser1.navigate "http://freemail.eyou.com/signup.html?bgp=%ce%d2%bd%d3%ca%dc&bgp_enable=on"

end if

至此代理服務(wù)器的修改也完成了。

對于一些有驗(yàn)證碼的網(wǎng)站如何識(shí)別出圖片上的驗(yàn)證碼,我還沒有辦法解決,我試著用vc寫了一個(gè)圖片識(shí)別程序,但效果很不理想,希望大家多交流。






最大的網(wǎng)站源碼資源下載站,

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 西宁市| 蒙自县| 海盐县| 大荔县| 方正县| 莱阳市| 盖州市| 定安县| 德化县| 称多县| 湖北省| 东海县| 抚顺市| 阿巴嘎旗| 游戏| 容城县| 海阳市| 红桥区| 许昌县| 屯门区| 新蔡县| 上蔡县| 利津县| 台南市| 寿宁县| 涪陵区| 兴安县| 宁波市| 雷山县| 绍兴县| 扶余县| 田东县| 清流县| 灵宝市| 保定市| 巴林右旗| 成都市| 崇信县| 巴东县| 苍山县| 江油市|