S
S
Sergey Prisyazhnyuk2019-06-06 20:40:20
PHP
Sergey Prisyazhnyuk, 2019-06-06 20:40:20

Why don't curl proxies work?

Parsing, I mean the 2gis site, everything was fine and then they tell me your IP is banned, I decided to put a proxy and it also gives me a window that the IP is banned and already with the proxy IP. What's wrong ? Maybe something in the hosting settings?

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);


$url = "https://2gis.ru/novosibirsk/firm/141265769757489";

$curl = curl_init($url);
$proxy = '153.92.5.186:8080';

//curl_setopt($curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
//curl_setopt($curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($curl, CURLOPT_PROXY, $proxy);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_HEADER, true);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);


$page = curl_exec($curl);

echo $page;



?>

5cf9500161738219552684.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2019-06-06
@AUser0

This means that 2gis (or hoster) administrators are aware of the existence of proxy technology, such an address was seen / fixed somewhere, and has already been blocked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question