
Teach you to use Excel macros to hang proxy IP handily
Sensei whether you are doing data collection or web monitoring, using VBA to access the network often encounter IP blocked. At this time, you need a proxy IP tostealth operationToday, take ipipgo home proxy service as an example, teach you how to set up a proxy in Excel.
Why do I need a proxy IP?
For example, you wrote a macro to capture the weather at regular intervals, and after visiting the site a dozen times in a row, you suddenly report an error - that's when the server pulls the plug on your IP. Proxy IPs are likeA pass that changes faces., change your identity each time you visit to ensure that the script runs stably.
Three Steps to Core Code
Sub Request With Proxy()
Dim http Object As Object
Set http Object = CreateObject("WinHttp.WinHttpRequest.5.1")
'The point is here ↓↓↓
http Object.SetProxy 2, "123.45.67.89:8080" 'ipipgo provide proxy address
http object.SetCredentials "Account", "Password", 0
http object.Open "GET", "http://目标网站.com", False
httpObject.Send
Debug.Print http object.ResponseText
End Sub
take note ofSetProxy ParametersThe first number 2 means proxy server, 1 is direct connection. Proxy address format must be "IP:Port", just replace it with the address given by ipipgo.
Dynamic IP automatic switching skills
When batch operation is required, it is recommended to use ipipgo'sDynamic Residential IPPackage. Their API gets new IPs in real time, and the code can be changed like this:
'Example of getting new IP from ipipgo
Proxy Address = GetNewProxyIP() 'Call ipipgo's API interface
http object.SetProxy 2, proxy address
Guidelines on demining of common problems
Q: I can't connect even though I have set the proxy?
A: First check these three places: 1. proxy address with port number 2. account password is expired 3. whether to choose the correct type of protocol (HTTP/HTTPS do not get the opposite)
Q: What if I need an overseas agent?
A: ipipgo'scross-border rail lineThe package supports more than 200 countries, just choose the target region node. For example, if you want Germany IP, you can choose the server that starts with DE in the background.
| Package Type | Applicable Scenarios | prices |
|---|---|---|
| Dynamic residential (standard) | General Data Acquisition | From $7.67/GB/month |
| Dynamic Residential (Business) | multithreaded crawler | From $9.47/GB/month |
| Static homes | Services requiring fixed IP | From $35/IP/month |
It is important to choose the right agency service provider
Having used seven or eight proxy services, ipipgo has two highlights.API responsivenessfast enough (returned to the new IP within 300ms in real life), and secondly, support for theSocks5 protocolIt is more stable than normal HTTP proxy. Their technical customer service can remotely assist in debugging the code, which is more friendly to newbies.
Lastly, a reminder: Proxy IPs are not everything, and work better with these tips:
1. 1-3 seconds at random intervals for each request
2. Critical operation switchingStatic Residential IP
3. Managing multiple proxy channels with the ipipgo client

