Файл: act.php
Строк: 44
<?php
require_once './config.php';
$url = 'http://faptv.net/actress/'.trim($_GET['id']).'';
$cachtime = 86400;
$url2 = md5($url);
$cachfile = 'cache/pages/'.$url2.'';
##############################
if(file_exists($cachfile) AND ((time() - filemtime($cachfile)) < $cachtime))
{ $out = file_get_contents($cachfile);
preg_match('|<title>(.*)</title>|Us', $out, $titless);
}else{
require_once './curl.php';
##############################
$res = preg_replace('#<a class="previous hidden" href=".*">« назад</a>#siU', '', $res);
preg_match('|<title>(.*)</title>|Us', $res, $titless);
$titless[1]=str_replace('FapTV.net', ''.copyR.'', $titless[1]);
preg_match_all('|<div class="img">(.*)<a href="(.*)"><img src="(.*)"/>(.*)</a>(.*)</div>(.*)<div class="info">(.*)<div class="title">(.*)<a href="(.*)">(.*)</a>(.*)</div>(.*)<div class="extrainfo">(.*)</div>|Us', $res, $down);
if(CACHIMG == 1) {
$down[3]=str_replace('http://img.titstube.t', ''.HOME.'scr1/', $down[3]);
$down[3]=str_replace('http://img.faptv.ne', ''.HOME.'scr1/', $down[3]); }
$down[2]=str_replace('/site/download/video/', ''.HOME.'get/', $down[2]);
$down[9]=str_replace('/video/', ''.HOME.'download/', $down[9]);
if (!empty($down[1][0])){
$count = count($down[1]);
$i = 0;
$out .='<title>'.$titless[1].'</title>';
while ($i < $count){
$out .= ''.DIVtitle.''.$down[10][$i].'</div>
'.DIVfon.'<img src="'.$down[3][$i].'"/></div>
'.DIVfon.'<a href="'.$down[9][$i].'">Посмотреть 3gp/mp4</a> | <a href="'.$down[2][$i].'"> Скачать HD mp4</a> | Время: '.$down[13][$i].'</div>';
$i++;
}}
else
{ $out .= 'Ошибка'; }
##################################
if(count($down[10]) == 10) {
preg_match('|<div class="pagerin">(.*)</div><div class="pagerin">|Us', $res, $backs);
$backs[1]=str_replace('"/', '"'.HOME.'', $backs[1]);
$backs[1] = str_replace('actress/', 'act.php?id=', $backs[1]);
$backs[1] = str_replace('назад</a>', 'назад</a> | ', $backs[1]);
$out .= ''.DIVlink.''.$backs[1].'</div>'; }
##################################
if(CACH == 1) {
$file = fopen($cachfile,'w');
fputs($file, $out);
fclose($file);
}}
$out = preg_replace('#<title>(.*)</title>#siU', '', $out);
##################################
$pp='';
$pag=explode('=',$_GET['id']);
if (empty($pag[1])){$pp='1';}else{$pp=$pag[1];}
$titles = 'HD Порно '.$titless[1].' ('.$pp.' стр.)';
include('./system/head.php');
include('./system/bar.php');
echo $out;
include('./system/foot.php');
?>