<?
include '../inc/head.php';
ini_set('display_errors',0); ini_set ('register_globals', 0);session_name('SID'); session_start();
############################################################################################
$host= "mp3.fonzo.ru";$path="/?".$_SERVER ['QUERY_STRING'];$fp=fsockopen($host,80,$errno,$errstr,10);if(!$fp) { echo "$errstr ($errno)<br/>\n"; }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.0\r\n";else$headers = "GET $path HTTP/1.0\r\n"; $headers.= "Host: $host\r\n";$headers.= "Accept: text/html, application/xml;q=0.9, application/xhtml xml, image/png, image/jpeg, image/gif,image/x-bitmap, */*;q=0.1\r\n";$headers.= "Accept-Charset: utf-8;q=0.6 windows-1251;q=0.1*;q=0.1\r\n";$headers.= "Accept-Encoding: utf-8\r\n";$headers.= "Accept-Language: ru, en;q=0.9\r\n";$headers.= "User-Agent:".$_SERVER ['HTTP_USER_AGENT']."\r\n";if($post){ $headers.= "Content-type: application/x-www-form-urlencoded\r\n";$headers.= "Content-Length:".strlen ($data)."\r\n";$headers.= "\r\n"; $headers.=$data;}else $headers.="\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('<a href="http://fonzo.ru/">fonzo.ru</a>', '', $file);
$file=str_replace('<meta http-equiv="Content-Style-Type" content="text/css" />', '', $file);
$file=preg_replace('|<div class="menu">(.*)<b>FONZO.RU</b>|is', '', $file);
$file=preg_replace('|<div class="rek">(.*)<div class="news_header">|is', '', $file);

$file=str_replace('<title>Поиск mp3</title>', '', $file);
$file=str_replace('/imp3/', 'http://mp3.fonzo.ru/imp3/', $file);

$file=str_replace('?', 'mp3/index.php?', $file);
$file=str_replace('<link rel="stylesheet" type="text/css" href="/xhtml.css" />', '', $file);
$file=str_replace('<link rel="shortcut icon" href="/favicon.ico"/>', '', $file);
$file=str_replace('<div class="news_header">
</div>', '<div class="cm">', $file);
$file=preg_replace('|<div class="news_body">(.*)</html>|is', '', $file);
$file=preg_replace('|<div class="footer">(.*)</html>|is', '', $file);
$file=preg_replace('|<div class="rek">(.*)<a href="http://kape.cc">Б*Е*С*П*Л*А*Т*Н*О!</a>|is', '', $file);
$file = preg_replace('|<a href="(.*)http://kape.cc(.*?)">(.*)|', '', $file);
$file = preg_replace('|<a href="(.*)http://ebuchka.ru(.*?)">(.*)|', '', $file);
$file=preg_replace('|<a href="http://fonzo.ru/adv/mp3/index.php?(.*?)</a>|is', '', $file);




##############################################
echo $file;
include '../inc/foot.php';
?>
