Answer the question
In order to leave comments, you need to log in
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);
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question