- <?
- $query = (isset($_SERVER['QUERY_STRING'])) ? 'http://pisi.su'.$_SERVER['QUERY_STRING'] : 'http://pisi.su';
- $ch = curl_init($query);
- curl_setopt ($ch, CURLOPT_USERAGENT, "Nоkiа5530XprеssMusic/GoBrowser/1.6.0.48");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, '');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $result = curl_exec($ch);
- $result = str_replace(array(chr(13),chr(10)),'',$result);
- curl_close($ch);
- $result = str_replace('<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"><html xmlns="http://www.w3.org/1999/xhtml">','',$result);
- $result = preg_replace("~<head>(.*)<\/head>~siU","",$result);
- $result = preg_replace("~<div class=\"logo\">(.*)<\/div>~siU","",$result);
- $result = preg_replace("~<!--TEASER BLOCK START-->(.*)<!--TEASER LOADER END-->~siU","",$result);
- $result = preg_replace("~<div class=\"search\">(.*)<\/div>~siU","",$result);
- $result = preg_replace("~<div class=\"block\"><a href=\"/search\.html\">(.*)<\/a><\/div>~siU","",$result);
- $result = preg_replace("~<div class=\"ads\">(.*)<\/div><\/div>~siU","",$result);
- $result = preg_replace("~<div class=\"banner\">(.*)<\/body>~siU","</body>",$result);
- $result = preg_replace("~\/get\/(.*)~siU","http://pisi.su/get/$1",$result);
- $result = str_replace('href="','href="?',$result);
- $result = str_replace("href='","href='?",$result);
- $result = str_replace('href="?http:','href="http:',$result);
- $result = str_replace('<img src="','<img src="http://pisi.su',$result);
- include 'head.php';
- echo $result;
- include 'foot.php';
- ?>