Просмотр файла wab/erotic/erotics.php

Размер файла: 2.05Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
  header("Content-type:text/html;charset=utf-8");
list($msec,$sec)=explode(chr(32),microtime());
$HeadTime=$sec+$msec; 

include ('../color.php');
include ('../head.php');
if (empty($_GET['s'])) $s = 1;
if (empty($_GET['p'])) $p = 1;

$host = "wap.wab.ru";
$path = "/downloads/erotics.php?p=$p&s=$s";
$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($text != "\r\n") $text = fgets($fp,128);
$text = "";
while(!feof($fp)) $text .= fgets($fp,4096);
fclose($fp);
}

//$text = join('', file("http://www.wab.ru/downloads/video"));
$next  =  ereg("&gt;&gt;", "$text");
$back  =  ereg("&lt;&lt;", "$text");
$text = explode("</head>",$text);  // отрезаем перед
$text = $text[1];

$text = explode("</div>",$text);  // отрезаем перед
$text = $text[2];

$text = str_replace("wp","http://wap.wab.ru/downloads/wp/",$text);
$text = str_replace("wp","http://wap.wab.ru/downloads/wp/",$text);
$text = str_replace("scr","Loading ",$text);
$text = str_replace("Go","&#x421;&#x43A;&#x430;&#x447;&#x430;&#x442;&#x44C; ",$text);
$text = str_replace(" style=\" color: #0000FF\"","",$text);
$text = strip_tags($text, "<a><br/><img>");
if (empty($_GET['s'])) $s = 1;





print "$text";
print "<br/>$br";
if ($back == true) print "<a href=\"erotics.php?p=$p&amp;who=$who&amp;s=".($s - 1)."\"><small>&#x41D;&#x430;&#x437;&#x430;&#x434;</small></a>|";
//$start < 400
if($next == true)print "<a href=\"erotics.php?p=$p&amp;who=$who&amp;s=".($s + 1)."\"><small>&#x412;&#x43F;&#x435;&#x440;&#x435;&#x434;</small></a>";

print "<br/>$br ";
print "$homeurl";

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