The task is trivial, there is a “mirror” of a foreign site, which in real time takes data from it, translates it into Russian and displays it to the user.

A foreign site does not specifically ban requests, but sometimes all the same requests to one of the sections of the site are banned.

You can get around this case through a proxy, but, of course, it's not free.

Is it possible to send requests to this site from my php script as via tor browser? The only goal is to avoid ip blocking. I'm not very familiar with the technology of tor, because the question can be clumsy.

    2 answers 2

    From the point of view of the Tor script, this is the same proxy, the connection with it is no different from any other connection through a proxy server.

    Simply install and configure Tor, after which you specify the address 127.0.0.1:9050 as the SOCKS5 proxy for the 127.0.0.1:9050 (if you didn’t change anything else in the settings). In the case of curl it will look like this:

     curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050'); 

    or so:

     curl_setopt($ch, CURLOPT_PROXY, 'socks5://127.0.0.1:9050'); 
    • Is it a free alternative to proxy server services? Or is not everything so rosy? - Dima G.
    • As I understand it, the traffic will go through tor, but the ip will be static. Well, or at least it will not change often. - Dima G.

    Everything is not so rosy, because Thor is very lagging. If the site to which the appeal goes is IPv6, then the proxies will be very cheap. Another option is to pretend to be Google-bot - suddenly it is not banned.