Просмотр файла pricat/index.php

Размер файла: 1.81Kb
<?php
$user_agent = "User_agent: Opera/8.50 (Windows NT 5.1; U; ru)\r\n";
$accept = "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif,image/x-bitmap, */*;q=0.1\r\n";
$accept_language = "Accept-Language: ru, en;q=0.9\r\n";
$accept_charset = "Accept-Charset: utf-8;q=0.6 windows-1251;q=0.1 *;q=0.1\r\n";
$referer = "Referer: http://wap.kysaka.org\r\n";
$conection = "Connection: Close\r\n";
$host= "wap.kysaka.org";
$path="/pricat/index.php?".$_SERVER['QUERY_STRING'];
$fp=fsockopen($host,80,$errno, $errstr,10);
if(!$fp) {
echo "$errstr ($errno)<br/>\n";
} else {
$data = "";$post=0;
foreach($_POST as $key=>$value){$post=1;
	$data.="&$key=$value";}
if($data)$data=substr($data,1);
if($post)
$headers = "POST $path HTTP/1.0\r\n";else
$headers = "GET $path HTTP/1.0\r\n";
$headers .= "Host: $host\r\n";
$headers .= "Accept: *\r\n";
$headers .= "Accept-Charset: UTF-8\r\n";
$headers .= "Accept-Charset: *\r\n";
$headers .= "Accept-Encoding: deflate\r\n";
$headers .= "Accept-Language: ru\r\n";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01\r\n";
if($post){
$headers .= "Content-type: application/x-www-form-urlencoded\r\n";
$headers .= "Content-Length: ".strlen ($data)."\r\n";
$headers .= "\r\n";
$headers .= $data;}else $headers.="\r\n";
@fwrite($fp, $headers);
while($file != "\r\n") $file = @fgets($fp, 128);
$file = '';
while(!feof($fp)) $file .= @fgets($fp, 4096);
@fclose($fp); }
$file=str_replace('© wap.kysaka.org','на главную',$file);
$file=str_replace('.::wap.KYSAKA.org::.','Анекдоты на сайт.ру',$file);
$file=str_replace('<b>Wap.Kysaka.Org</b>','сайт.ру',$file);
$file=str_replace('<a href="http://wap.kysaka.org','<a href="http://сайт.ру',$file);
echo $file;
?>