View file lib/index.php

File size: 1.9Kb
<?php
/*
mod by denich
*/

$host = "wapos.ru";
$path = '/lib/index.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 = ereg_replace('<title>WAP.SASISA.RU</title>', '<title>ТВ Программа</title>',$file);
$file = ereg_replace('- <a href="http://wapos.ru">Ha &#x0433;&#x043B;a&#x0432;&#x043D;&#x0443;&#x044E;</a><br/>', '',$file);
$file = ereg_replace('- <a href="http://wap2.1124.ru/demo/6577264562/,55">&#x0414;e&#x043C;o-&#x0432;epc&#x0438;&#x0438; &#x0438;&#x0433;p</a><br/>', '',$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('<a href="c.php', '&#0187; <a href="c.php',$file);
$file = str_replace('<?xml version="1.0" encoding="UTF-8"?>', '',$file);
$file = str_replace('<a href="c.php?', '<a href="c.php?site='.$site.'&amp;tcolor='.$tcolor.'&amp;fcolor='.$fcolor.'&amp;lcolor='.$lcolor.'&amp;',$file);

include '../head.php';

echo $file;

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