Kimeraweb

Untitled

Jul 1st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2. $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
  3. if (!$fp) {
  4.     echo "$errstr ($errno)<br />\n";
  5. } else {
  6.     $out = "GET / HTTP/1.1\r\n";
  7.     $out .= "Host: www.example.com\r\n";
  8.     $out .= "Connection: Close\r\n\r\n";
  9.     fwrite($fp, $out);
  10.     while (!feof($fp)) {
  11.         echo fgets($fp, 128);
  12.     }
  13.     fclose($fp);
  14. }
  15. ?>
Add Comment
Please, Sign In to add comment