ulvis.paste.net

Paste Search Dynamic
Recent pastes
header.php
  1. <?php
  2.  
  3. $host = 'www.myurl.com/script.js';
  4. $service_uri = '/detect_referal.php';
  5. $vars ='additional_option1=yes&additional_option2=un';
  6.  
  7. $header = "Host: $host\r\n";
  8. $header .= "User-Agent: PHP Script\r\n";
  9. $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
  10. $header .= "Referer: http://www.google.com/search?hl=en&q=my+ip&btnG=Google+Search \r\n";
  11. $header .= "Content-Length: ".strlen($vars)."\r\n";
  12. $header .= "Connection: close\r\n\r\n";
  13.  
  14. $fp = fsockopen("".$host,80, $errno, $errstr);
  15.  
  16. if (!$fp) {
  17.   echo "$errstr ($errno)<br/>\n";
  18.   echo $fp;
  19. } else {
  20. fputs($fp, "POST $service_uri  HTTP/1.1\r\n");
  21. fputs($fp, $header.$vars);
  22. fwrite($fp, $out);
  23.  
  24. while (!feof($fp)) {
  25. echo fgets($fp, 128);
  26. }
  27. fclose($fp);
  28. }
  29. ?>
Parsed in 0.023 seconds