M
M
Michael R.2016-12-16 17:05:37
PHP
Michael R., 2016-12-16 17:05:37

How to iterate through proxies until we find a working one?

Hello!
I wrote a function that outputs a proxy in the ip:port format.
After some testing, it turned out that many proxies do not work, or give a timeout or some other errors.
Question: can you tell me what is the logic behind writing a function that will first 'shake' this proxy, and if it is working > pass ip:port of this proxy to the next script? Well, i.e. how to write the condition correctly (if the worker is true), I just can't figure it out...
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2016-12-16
@Mike_Ro

https://gist.github.com/riot26/9161d2cb2ae6dda42af5
there is a function to check proxy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question