I have such a task: there is a PHP script, which with the help of the cUrl module follows the link (you just need to go and that’s it), but it does not go without a proxy. If you specify one proxy, then it will act for some time and does not respond, this is normal, because it is open, but I need it without interruption. There is a service that returns the address of the live proxy in json format, we get it, decode it and get the proxy address, but to get this address, you still need to follow the link. Here is such a vicious circle.

    1 answer 1

    Connect to the service without a proxy, get a proxy, connect the proxy to CURL and follow the link.

    If the link request gave an empty answer, then the proxy is dead, disable the proxy and receive a new live proxy from the service, etc.

    You can make 2 instances of CURL, one with a proxy, the other without and use them according to the algorithm above.

    • No, this is not an option. My cUrl without a proxy does not connect and gives an empty result. - Daniel