国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 合阳县| 汝州市| 太仓市| 克什克腾旗| 达尔| 陕西省| 文化| 台山市| 丽江市| 普洱| 北川| 霍州市| 尤溪县| 尚志市| 海宁市| 镇赉县| 都昌县| 乌拉特中旗| 利川市| 黄浦区| 临清市| 务川| 漠河县| 米泉市| 吕梁市| 怀远县| 永平县| 苗栗县| 唐山市| 广丰县| 云南省| 会泽县| 凌云县| 筠连县| 闸北区| 商河县| 石狮市| 德阳市| 珠海市| 台州市| 芜湖县|