<?php
#####
include_once 'heads.php';
include_once 'c.php';
function curl_get($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_USERAGENT,'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.2.15 Version/10.10');
curl_setopt($curl, CURLOPT_REFERER, "http://pux.su");
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$cnt = curl_exec($curl);
curl_close($curl);
return $cnt;
}
$file=curl_get('http://mobile.xshare.com/'.$_SERVER['QUERY_STRING']);
$file=preg_replace('|<!DOCTYP(.*?)<h3 class="blackhdr">|is', '<h3 class="blackhdr">',$file);
$file=preg_replace('|<li style="background:none;border:0;text-align:center;height:99px;"><iframe(.*?)</iframe></li>|is', '',$file);
$file=str_replace('href="http://mobile.xshare.com/','href="?', $file);
$file=str_replace('href="/','href="?', $file);
$file=str_replace('src="i','src="http://mobile.xshare.com/i', $file);
$file=str_replace("location='http://mobile.xshare.com/","location='?", $file);
$file=preg_replace('|<div style="margin:0 auto;width:300px;height:250px;overflow:hidden">(.*?)</div>|is', '',$file);
$file=preg_replace('|<p style="background:none;border:0;text-align:center;height:99px;">(.*?)</p>|is', '',$file);
$file=preg_replace('|<div id="videopreview">(.*?)vid/|is', '<div id="videopreview"><a href="http://mobile.xshare.com/vid/',$file);
$file=preg_replace('|<i class="icon(.*?)</i>|is', '',$file);
$file=preg_replace('|<div class="ftr">(.*?)</html>|is', '',$file);
$file=preg_replace('|<div id="sitedetails">(.*?)</div>|is', '',$file);
$file=str_replace('>Most Viewed</a>','>Most Viewed</a>'.$random.'', $file);
$file=str_replace('<li class="videorating"> Rating:','<li class="videoviews"><strong>'.$random.'</strong></li><li class="videorating"> Rating:', $file);
$file=str_replace('<li><a href="#related">Related</a></li>','', $file);
##############################################
echo $file;
include_once 'foots.php';
?>