Просмотр файла lib/b.php

Размер файла: 2.75Kb
<?php
/*
mod by denich
*/

$host = "wapos.ru";
$path = '/lib/b.php?'.$_SERVER['QUERY_STRING'];
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp) echo"$errstr ($errno)<br />\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 .= "Referer: wapos.ru\r\n";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01\r\n\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('- <a href="http://wapas.ru/lib/index.php">&#x043A; &#x0441;&#x043F;&#x0438;&#x0441;&#x043A;&#x0443; &#x043A;&#x043D;&#x0438;&#x0433;</a><br/>', '<br/><a href="index.php">&#x043A; &#x0441;&#x043F;&#x0438;&#x0441;&#x043A;&#x0443; &#x043A;&#x043D;&#x0438;&#x0433;</a><br/>',$file);
$file = str_replace('- <a href="http://wapas.ru/clik/jump.php?22">Ha &#x0433;&#x043B;a&#x0432;&#x043D;&#x0443;&#x044E;</a><br/>
-------<br/>', '',$file);
$file = str_replace('- <a href="http://wap2.1124.ru/demo/6577264562/">&#x0414;&#x0435;&#x043C;&#x043E;-&#x0438;&#x0433;&#x0440;&#x044B;</a><br/>', '',$file);
$file = str_replace('- <a href="http://wap2.1124.ru/catalog/6577264562/erotic/">&#x041B;&#x0443;&#x0447;&#x0448;a&#x044F; &#x042D;po&#x0442;&#x0438;&#x043A;a</a><br/>', '',$file);
$file = str_replace('- <a href="http://wap2.1124.ru/partner/6577264562/video/">B&#x0438;&#x0434;eo-K&#x043B;&#x0443;&#x0431;&#x043D;&#x0438;&#x0447;&#x043A;a</a><br/>', '',$file);
$file = str_replace('<b>wap.wapos.ru</b><br/><br/><br/><br/><br/>', '',$file);
$file = str_replace('<a href="http://waplog.net/ru/c.shtml?57"><img src="http://c.waplog.net/ru/57.cnt" alt="w" /></a>', '',$file);
$file = str_replace('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml>', '',$file);
$file = str_replace('<card id="WAPContact" title="wapos.ru library">', '',$file);
$file = str_replace('<p>', '',$file);
$file = str_replace('</p>', '',$file);
$file = str_replace('</card>', '',$file);
$file = str_replace('</wml>', '',$file);
$file = str_replace('<small>', '',$file);
$file = str_replace('</small>', '',$file);
$file = str_replace('<?xml version="1.0" encoding="UTF-8"?>', '',$file);
$file = str_replace('<a href="b.php?', '<a href="b.php?site='.$site.'&amp;tcolor='.$tcolor.'&amp;fcolor='.$fcolor.'&amp;lcolor='.$lcolor.'&amp;',$file);
$file = str_replace('<a href="index.php', '<a href="index.php?site='.$site.'&amp;tcolor='.$tcolor.'&amp;fcolor='.$fcolor.'&amp;lcolor='.$lcolor.'',$file);

include '../head.php';

echo $file;

include '../foot.php';
?>