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

Размер файла: 2.56Kb
<?php
/* Author - wapok */
error_reporting(0);
require 'head.php';
$wurl = 'http://твойсайт.ру';
$host= "video.wapos.ru";
$path="/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: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif,image/x-bitmap, */*;q=0.1\r\n";
$headers .= "Accept-Charset: utf-8;q=0.6 windows-1251;q=0.1*;q=0.1\r\n";
$headers .= "Accept-Encoding: utf-8\r\n";
$headers .= "Accept-Language: ru, en;q=0.9\r\n";
$headers .= "User-Agent: ".$_SERVER['HTTP_USER_AGENT']."\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=preg_replace('|<!DOC(.*)<div class="t">|si','<div class="t">',$file);
$file=preg_replace('|<div class="menu">
<a href(.*)</html>|si','',$file);
$file=preg_replace('|<input class(.*)</div></div>|si','</div>',$file);
$file=str_replace('http://wapos.ru/index.php',''.$wurl.'',$file);
$file=str_replace('<img src="imgs/folder.gif" alt=""/>','&#187;',$file);
$file=str_replace('<img src="imgs/o/ob.gif" alt=""/>','+',$file);
$file=str_replace('<div class="menu2">','',$file);
$file=str_replace('</div></div>','</div>',$file);
$file=str_replace('</div>
<br/>','</div>',$file);
$file=str_replace('</div><br/>','</div>',$file);
$file=str_replace('<div class="menu">','',$file);
$file=str_replace('<div class="m"> 
<div class="top">','<div class="top">',$file);
$file=str_replace('<a href="http://video.wapos.ru','* <a href="wapok.php?d=',$file);
$file=str_replace('http://films.wapos.ru','http://wapok.us',$file);
$file=str_replace('&lt;&lt; ','',$file);
$file=preg_replace('|<!DOC(.*?)<br/>Спасибо. |si','<div class="t">Оценка</div><div class="m">',$file);
$file=preg_replace('|вернуться</a><br/><br/><br/>(.*?)</html>|si','Вернуться</a></div>',$file);
$file=str_replace('Ваш голос учтен.','Спасибо, голос учтен.</div><div class="top">',$file);
$file=str_replace('<br/><a href="?fid=','<a href="?fid=',$file);
echo $file;
require 'foot.php';
?>