If an IP is registered for a period of time, the IP will be sealed, and a way is to modify the registry to modify the proxy server. Here I use an API function InternetSetOption, to add a module before use, then add the following code:
Public const interface_option_proxy = 38
Public const interface_open_type_proxy = 3
Public const interface_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
The rescotation code defines three constants and a structure. If the specific usage of the API function, please query MSDN. VB modifying the registry too much, I don't say much. In the webbrowser1_documentcomplete event, add a conditional statement to determine if it is an IP-blocked prompt page, the code is as follows:
IF INSTR (Doc.Body.innertext, "IP address has been registered with too many users in this period of time")> 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 = creteObject ("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=