Просмотр файла melody/melodies.php

Размер файла: 3.16Kb
<?

//////////////////////////////////////////////////////////////////////////////////////////////
/////                            Made by   :  007                                           //
/////                              E-mail  :  [email protected], [email protected]               //
/////                               Site  :  http://007.mbn.net.ru                          //
/////                                Site  :  http://mbn.net.ru                             //
//////////////////////////////////////////////////////////////////////////////////////////////
//  ВЫ ИМЕЕТЕ ПОЛНОЕ ПРАВО ВНОСИТь ИЗМЕНЕНИЯ В КОД СКРИПТА ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ  //
//  Прошу  не барыжить этим скриптом. НЕ забудьте поделиться с автором новыми версиями      //
//////////////////////////////////////////////////////////////////////////////////////////////

Error_Reporting(E_ALL & ~E_NOTICE);
extract($HTTP_GET_VARS);

include('up.php');
$head= @implode("",@file("head.dat"));

if (empty($_GET['s'])) $s = 1;
if (empty($_GET['l'])) $l = 1;
if (empty($_GET['t'])) $t = 1;
if (empty($_GET['in'])) $in = 1;
$host = "wap.wab.ru";
$path = "/downloads/melodies.php?t=$t&l=$l&s=$s&in=$in";
$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/1.xml"));
$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("melodies.php","out.php",$text);
$text = strip_tags($text, "<a><br/><b>");
$text = str_replace("<br/>","<br>",$text);


header("Content-type:text/vnd.wap.wml;charset=utf-8");
header("Content-type:text/html; charset=utf-8");
print "$head
<div class=a><b>Музыкальные загрузки</b><br></div>
<div>";
print "$text";

print "<hr>";
if ($back == true) print "<a href=\"melodies.php?in=$in&amp;t=$t&amp;l=$l&amp;s=".($s - 1)."\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a> |";
if($next == true)  print "<a href=\"melodies.php?in=$in&amp;t=$t&amp;l=$l&amp;s=".($s + 1)."\">&#x412;&#x43F;&#x435;&#x440;&#x435;&#x434;</a><br>";

$banners= @implode("",@file("./banners.dat"));

print "<hr></div><div class=b>$up[1]</div><br>
<a href=\"./spisok.php?t=$t&amp;l=$l&amp;ur=$ur\">назад</a><br>

<a href=\"$ur/\">на глваную</a><br></div><div class=b>$banners";

print "</div></body></html>";
?>