Parsing in php

Hello, I have a question.

My site is parsing someone else’s site, what information is left on someone else’s site (log or statistics) about the action of my script (site)? Is there any way to hide this information? Can the site I’m parsing somehow “cover” me in terms of access to its pages?

If somewhere there is info on this topic, give a link.


Answer 1, authority 100%

Generate a random user agent (you can randomize other request fields) and use proxies, then no one will do anything to you.

And I advise you to use bare sockets, there is more space.

Minimal code for sockets:

$e1 = $e2 = false;
if ($s = fsockopen( gethostbyname('bash.org.ru'), 80, $e1, $e2, 5 /*    */)) { //  
  @fwrite($s, 
     "GET /quote/22722 HTTP/1.1\r\n"
    ."Host: bash.org.ru\r\n"
    ."User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506)\r\n"
    ."\r\n"
    ); //  
  $content = '';
  do {
    stream_set_timeout($s, 1);
    $str = @fread($s, 1024);
    $content .= $str;      
    } while (strlen($str) == 1024); //  
  fclose($s); //  
  }

This thing is copying bash quote 22722. You need to find (go to google) “how to send request through http proxy”, “list of User-Agent strings” (and randomize them), “free http proxy list”, and GET/POST request fields in general.


Answer 2, authority 50%

There are no special logs as such, because your script makes a GET request (although it would be nice to specify how you do it) and nothing more. Another thing is if the owner of that site pays attention to the referrer, and then if he himself provided for logging, or a counter from some provider of such a service is installed on the pages.
Another thing is if he closed file types (such as mp3 for example) using the same .htaccess from direct linking, then you need to think about the expediency of “robbing”. Roughly speaking, the “victim site” can take action, well, only if its admin-owner-other takes action, and competent ones, the same request rate filtering by IP, for example.