Файл: translate/index.php
Строк: 57
<?php
require'../config.php';
$align='left';
$title='Переводчик текстов';
aut();
head();
who_add(0,'enter');
echo '<div class="menu">';
$host= "owap.biz";
$path="/servis/perevod/?xhtml&".$_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.0rn";else
$headers = "GET $path HTTP/1.0rn";
$headers .= "Host: $hostrn";
$headers .= "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif,image/x-bitmap, */*;q=0.1rn";
$headers .= "Accept-Charset: utf-8;q=0.6 windows-1251;q=0.1*;q=0.1rn";
$headers .= "Accept-Encoding: utf-8rn";
$headers .= "Accept-Language: ru, en;q=0.9rn";
$headers .= "User-Agent: ".$_SERVER['HTTP_USER_AGENT']."rn";
if($post){
$headers .= "Content-type: application/x-www-form-urlencodedrn";
$headers .= "Content-Length: ".strlen ($data)."rn";
$headers .= "rn";
$headers .= $data;}else $headers.="rn";
@fwrite($fp, $headers);
while($file != "rn") $file = @fgets($fp, 128);
$file = '';
while(!feof($fp)) $file .= @fgets($fp, 4096);
@fclose($fp); }
$file = str_replace('<?xml version="1.0" encoding="UTF-8"?>','',$file);
$file = preg_replace('|<!DOCTYPE(.*)|','',$file);
$file = preg_replace('|<html(.*)|','',$file);
$file = preg_replace('|<head>|','',$file);
$file = preg_replace('|<style type="(.*)">|','',$file);
$file = preg_replace('|body{ font-weight(.*)|','',$file);
$file = preg_replace('|a:hover(.*)|','',$file);
$file = preg_replace('|.sec{padding(.*)|','',$file);
$file = preg_replace('|.h1{color(.*)|','',$file);
$file = preg_replace('|.h2{color(.*)|','',$file);
$file = preg_replace('|.h3{background-color(.*)|','',$file);
$file = preg_replace('|.c1{padding(.*)|','',$file);
$file = preg_replace('|</style|', '', $file);
$file = preg_replace('/<title>(.*)</title>/iuU', '', $file);
$file = preg_replace('|</head>|', '', $file);
$file = preg_replace('|</body>|', '', $file);
$file = preg_replace('|<body>|', '', $file);
$file = preg_replace('|<div>|', '', $file);
$file = preg_replace('|<div class="c1">|', '', $file);
$file = preg_replace('|<div class="sec">|', '', $file);
$file = preg_replace('|Переводчик<br/>|', '', $file);
$file = preg_replace('|</div>|', '', $file);
$file = preg_replace('/<a href="(.*)wapix.ru(.*)" class="h2">(.*)</a><br/>/iuU', '', $file);
$file = str_replace('action="/servis/perevod/index.php', 'action="index.php', $file);
$file = preg_replace('|<a href="/servis/(.*)" class="(.*)">Сервисы</a><br/>|', '', $file);
$file = preg_replace('|<a href="/index.php(.*)" class="(.*)">Owap.Biz</a><br/><br/>|', '', $file);
$file = preg_replace('|<a href="/index.php(.*)" class="(.*)">Owap.Biz</a><br/>|', '', $file);
$file = preg_replace('|<a href="(.*)wapix.ru(.*)">(.*)</a><br/>|', '', $file);
$file = preg_replace('|<a href="(.*)wapix.ru(.*)" class="(.*)">(.*)</a><br/>|', '', $file);
$file = preg_replace('|<img src="(.*)nash-kovcheg.ru(.*)" alt="(.*)"/></a><br/>|', '', $file);
$file = preg_replace('|<a href="(.*)waplog.net(.*)">|', '', $file);
$file = preg_replace('|<img src="(.*)waplog.net(.*)" alt="(.*)" /></a>|', '', $file);
$file = preg_replace('|<a href="(.*)gigatop.net(.*)">|', '', $file);
$file = preg_replace('|<img src="(.*)gigatop.net(.*)" alt="(.*)" /></a>|', '', $file);
$file = preg_replace('|</form><br/>|', '</form>', $file);
$file = preg_replace('|<br/>Введите текст перевода (до 3000 символов)<br/>|', 'Введите текст перевода (до 3000 символов)<br/>', $file);
$file = str_replace('<br/><br/>', '<br/>', $file);
$file = str_replace('</html>', '', $file);
$file = preg_replace('| rows="5" cols="30"|', '', $file);
if(isset($user)){
echo $file;
}else{
echo '<div class="err">Раздел Переводчик текстов доступен только для обитателей '.$_SERVER['HTTP_HOST'].'. </div>';
}
foot();
?>