Advertisement
Guest User

ping.php

a guest
Mar 28th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2. $URL = "www.yahoo.com";
  3. $ref = "www.test.it";
  4.  
  5. $fp = fsockopen($URL, 80, $errno, $errstr, 30);
  6.  
  7. $header = array(
  8.     'GET / HTTP/1.1',
  9.     'Host: ' . $URL,
  10.     'Referrer: ' . $ref,
  11.     'Connection: Close'
  12. );
  13.  
  14. fputs($fp, join("\r\n", $header) . "\r\n\r\n");
  15.  
  16. $data = "";
  17. while (!feof($fp)) $data.=fgets($fp,64000);
  18. fclose($fp);
  19.  
  20. print $data;
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement