$query_s = $_SERVER['QUERY_STRING']; $page = $_GET['page']; $serv = $_SERVER["HTTP_HOST"]; $remote_url = '/glinks.php?serv='.$serv.'&page='.$page.'&query_s='.$query_s; $remote_server = "www.ringator.ru"; $request = ''; // POST form $header = "POST $remote_url HTTP/1.0\n"; $header .= "Host: $remote_server\n"; $header .= "Content-Type: application/x-www-form-urlencoded\n"; $header .= "Content-length: " . strlen($request) . "\n\n"; $fp = fsockopen($remote_server, 80); if ($fp) { fputs($fp, $header . $request); $response = ""; while (!feof($fp)) $response .= fgets($fp, 128); fclose($fp); echo substr($response, strpos($response, "\n\r\n")); } else { echo "cannot connect \n"; } ?>