A
A
aopil2019-04-18 15:25:50
PHP
aopil, 2019-04-18 15:25:50

How to use curl with proxy port 3128 or 8080 or 81?

There are about 300 IPs and they have a random port, I started checking which are working and which are not, in order to sort. I check through the data substituted in Curl and make a request to some site and see if any result is returned.

curl_setopt($ch, CURLOPT_PROXY, '10.10.10.10:80');
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

and it turns out that a large number of Ip with port 80 are working, but any other ports are not working,
for example, there is IP 96.80.89.69:8080 - I substitute the data and make the same curl request and none of the hundreds of IPs work for me with port 8080 or 3128 or 81.
Maybe there are some nuances?) Can a proxy type be set differently?) I read on the Internet like all ports 8080 and 3128 and 81 belong to HTTP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zlo1, 2019-04-18
@zlo1

some HTTP proxies can only work in tunnel mode (connect proxy)
https://curl.haxx.se/libcurl/c/CURLOPT_HTTPPROXYTU...
optional, can be assigned as both socks4 and socks5 proxies

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question