A
A
Azat Kiberov2018-12-16 09:50:13
PHP
Azat Kiberov, 2018-12-16 09:50:13

Why is it that when I simulate a visit to a site with curl, the liveinternet counter does not read it?

I simulate visiting the site using curl.

<?php 
$host = "http://site.ru/"; 

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $host); 
curl_setopt($ch, CURLOPT_VERBOSE, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_AUTOREFERER, false); 
curl_setopt($ch, CURLOPT_REFERER, "http://test.ru"); 
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.137 YaBrowser/17.4.1.1026 Yowser/2.5 Safari/537.36');
curl_setopt($ch, CURLOPT_PROXY, $ip);
 
$result = curl_exec($ch); 
curl_close($ch);

Then I look at the counter and there is no visit .. I watch the transitions from the sites.
test.ru no. What could be the matter ..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2018-12-16
@mbxngtgo

Because the counter is executed on the client via javascript, and you have curl as a client, which does not know how in js.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question