Файл: bibl/c.php
Строк: 42
<?php
require '../sid.php';
require '../config.php';
$link = connect_db();
list($user, $id, $ps) = check_login($link);
whorm(0, 'games');
include '../head.php';
error_reporting(0);
$host = 'wapos.ru';
$path = '/lib/c.php?'.$_SERVER['QUERY_STRING'];
$fp = fsockopen($host, 80, $errno, $errstr, 10);
if(!$fp) {
echo 'Сервис временно не доступен<br/>';
}
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: */*rn";
$headers .= "Accept-Charset: UTF-8rn";
$headers .= "Accept-Language: rurn";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01rn";
if($post){
$headers .= "Content-type: application/x-www-form-urlencodedrn";
$headers .= "Content-Length: ".iconv_strlen($data, 'UTF-8')."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('<div class="li_blue"><img src="images/sb.gif" alt="-"/> <a class="blue" href="http://wapos.ru/lib/azbuka/index.php">Азбука секса</a></div>','',$file);
$file=str_replace('<div class="li_blue"><img src="images/sb.gif" alt="-"/> <a class="blue" href="http://wapos.ru/stories/">Эротические рассказы</a></div>','',$file);
$file=str_replace('<img src="images/sb.gif" alt="-"/>','<img src="sb.gif" alt="."/>',$file);
$file=str_replace('<link rel="stylesheet" type="text/css" href="http://wapos.ru/new4/style.css"/>','<link rel="stylesheet" type="text/css" href="style.css"/>',$file);
$file=str_replace('<a class="yellowurl" href="http://wapos.ru">На главную</a>','',$file);
$file=str_replace('Wapos.Ru','Библиотека',$file);
$file=substr($file,0,strrpos($file,'</a>')+4);
$file = str_replace('<img src="http://wapos.ru/images/logo.gif" width="87" height="21" alt="wapos.ru" />','',$file);
header('Content-type: text/html; charset=UTF-8');
echo ''.$file.'';
require_once '../foot.php';
?>