Просмотр файла horo/index.php

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

$host = "nashwap.ru";
$path = '/horo/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 .= "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('<?xml version="1.0"?>','',$file);
$file = preg_replace('/<!DOCTYPE html PUBLIC(.*?)<div class="ttl">/si','',$file);
$file = str_replace('</div>','',$file);
$file = str_replace('<div class="message_1">','<br/><br/>',$file);
$file = str_replace('<p><b>','&#187; ',$file);
$file = str_replace('</b>','',$file);
$file = str_replace('<span style="font-size: 9px">','',$file);
$file = str_replace('</span></p>','<br/>',$file);
$file = preg_replace('/<div class="nav">(.*?)<\/html>/si','<br/>',$file);
$file = str_replace('<p class="big">','',$file);
$file = str_replace('</p>','<br/>',$file);
$file = str_replace('<p>','',$file);
$file = str_replace('<div class="message_0">','',$file);
$file = str_replace('<p class="nom"><img src="img/arpp.gif" alt="-" />','',$file);
$file = str_replace('<img src="img/zodiak','<br/><br/><img src="http://nashwap.ru/horo/img/zodiak',$file);
$file = str_replace('<span class="big">','',$file);
$file = str_replace('</span>','<br/><br/>',$file);
$file = str_replace('<div class="message_2">','',$file);
$file = str_replace('<b class="purple">','',$file);
$file = str_replace('<a href="index.php?zlist">Выбрать другой знак</a><br/>','<br/><br/><a href="index.php?zlist">Выбрать другой знак</a><br/>',$file);
$file = str_replace('index.php?', 'index.php?site='.$site.'&amp;fcolor='.$fcolor.'&amp;tcolor='.$tcolor.'&amp;lcolor='.$lcolor.'&amp;',$file);

include '../head.php';

echo $file;

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