Файл: public_html/files.php
Строк: 39
<?
include 'inc/config.php';
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://m.extremetube.com/video/show/title/'.$_GET['video']);
curl_setopt($ch, CURLOPT_USERAGENT, 'Opera mini 4.3');
curl_setopt($ch, CURLOPT_REFERER, 'http://extremetube.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$file=curl_exec($ch);
curl_close($ch);
preg_match_all('#<h1>(.*)</h1>#sU',$file,$tit);
preg_match_all('#url((.*))(.*)<a(.*)href="(.*)">(.*)</a>#sU',$file,$zek);
$title=$tit['1']['0'];
include 'inc/head.php';
if (!empty($zek['1']['0']) && !empty($zek['4']['0'])){
if (!file_exists($root.'screen/'.name(trim($_GET['video'])).'.'.ext($zek['1']['0']))){
copy($zek['1']['0'], $root.'screen/'.name(trim($_GET['video'])).'.'.ext($zek['1']['0']));
}
if (!file_exists($root.'files/'.$copy.'_'.name(trim($_GET['video'])).'.'.ext2($zek['4']['0']))){
copy($zek['4']['0'], $root.'files/'.$copy.'_'.name(trim($_GET['video'])).'.'.ext2($zek['4']['0']));
}
if (class_exists('ffmpeg_movie')){
$mpeg=new ffmpeg_movie($root.'files/'.$copy.'_'.name(trim($_GET['video'])).'.'.ext2($zek['4']['0']));
$info='<br/><b>Resolution:</b> '.$mpeg->GetFrameWidth().'x'.$mpeg->GetFrameHeight().'<br/><b>Video codec:</b> '.$mpeg->GetVideoCodec().'<br/><b>Bitrate:</b> '.ceil(($mpeg->GetBitRate())/1024).' KBPS<br/><b>Duration:</b> '.FileDuration($mpeg->getDuration()).'';
}
echo $div_info.'<img src="'.$path.'screen/'.name(trim($_GET['video'])).'.'.ext($zek['1']['0']).'" alt="'.$title.'"><br/><br/><b>Size:</b> '.SizeFile(filesize($root.'files/'.$copy.'_'.name(trim($_GET['video'])).'.'.ext2($zek['4']['0']))).''.$info.''.$end_info.''.$div_link.'<a href="'.$path.'files/'.$copy.'_'.name(trim($_GET['video'])).'.'.ext2($zek['4']['0']).'"><img src="'.$path.'style/img/dwn.png"> Download Video</a>'.$end_link;
}else{
echo $div_error.'Erorr. Page does not exists'.$end_error;
}
include 'inc/foot.php';
?>