<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS ********* #
# Made by : Hoooch #
# E-mail : [email protected] #
# WAP-Site : http://vira.h2m.ru #
# ICQ : 77-148-55 #
# Вы не имеете право вносить изменения в код скрипта #
# для его дальнейшего распространения #
#-----------------------------------------------------#
require_once "../includes/start.php";
require_once "../includes/functions.php";
require_once "../includes/header.php";
include_once "../themes/".$config['themes']."/index.php";
$host = "lib.msoft.ms";
$path = "/?".$_SERVER['QUERY_STRING'];;
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp) echo"К сожалению сервис временно недоступен.<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: lib.msoft.ms\r\n\r\n";
fwrite($fp,$headers);
$file = "";
while(!feof($fp)) $file .= fgets($fp,4096);
fclose($fp);
}
$file = preg_replace('|G:(.*?)</div>|si','',$file);
preg_match_all('|<div class="main">(.+)</div>|si',$file,$data);
$file=$data[1][0];
$file = preg_replace('|</center>(.*?)<hr>|si','</center><hr>',$file);
$file = preg_replace('|<div class="g">(.*?)</div><div class="w">|si','',$file);
$file = preg_replace('|<img src="(.*?)alt=""/>|si','',$file);
$file = preg_replace('|<a href="http://(.*?)"></a><br />|si','',$file);
$file = str_replace('<a href="./zip/','<a href="http://lib.msoft.ms/zip/',$file);
$file = str_replace('<a href="./jar/','<a href="http://lib.msoft.ms/jar/',$file);
$file = str_replace('<a href="./txt/','<a href="http://lib.msoft.ms/txt/',$file);
//замените css классы на свои если надо
$file = str_replace('<div class="g">','<div class="b">',$file);
$file = str_replace('<div class="w">','<div class="b">',$file);
$file = str_replace('<div class="q">','<div class="c">',$file);
$file = str_replace('<div class="text">','<div class="c">',$file);
$file = str_replace('<div class="b"><a href="http://msoft.ms">© MSOFT.MS</a></div>','',$file);
$file = str_replace('<br /><a href="http://waplog.net/ru/c.shtml?54022"><img src="http://c.waplog.net/ru/54022.cnt" alt="waplog" /></a>','',$file);
$file = str_replace('<a href="?id=0&SESS=ef97ec51b017d72e2eb9a392efd49d66">Назад к началу</a>','<a href="lib.php">Назад к началу</a>',$file);
echo $file;
echo "</div>";
echo'<br /><a href="lib.php?do=3&">Поиск книг</a><br />';
echo'<a href="lib.php?">Библиотека</a><br />';
echo'<a href="../">На главную</a>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a> ';
include_once "../themes/".$config['themes']."/foot.php";
?>