Файл: link/act.php
Строк: 48
<?php
require_once '../config.php';
if(empty($_GET['id'])) {
$url = 'http://faptv.net/actress/';
}else{
$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); }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="tags">(.*)src="(.*)"(.*)href="(.*)">(.*)</a>(.*)</div>|Us', $res, $down);
if(CACHIMG == 1) {
$down[2]=str_replace('http://img.titstube.t', ''.HOME.'scr1/', $down[2]);
$down[2]=str_replace('http://img.faptv.ne', ''.HOME.'scr1/', $down[2]); }
$down[2]=str_replace('/images/on.png', ''.HOME.'link/no.gif', $down[2]);
$down[4]=str_replace('/actress/', ''.HOME.'act/', $down[4]);
$down[6]=str_replace('(', '', $down[6]);
$down[6]=str_replace(')', '', $down[6]);
if (!empty($down[1][0])){
$count = count($down[1]);
$i = 0;
while ($i < $count){
$out .= ''.DIVtitle.''.$down[5][$i].' </div>
'.DIVfon.'<img src="'.$down[2][$i].'"/></div>
'.DIVfon.'<a href="'.$down[4][$i].'">Посмотреть порно с актриссой</a> | Видео: '.$down[6][$i].'</div>';
$i++;
}}
else
{ $out .= 'Ошибка'; }
##################################
if(count($down[4]) == 10) {
preg_match('|<div class="pagerin">(.*)</div>|Us', $res, $backs);
$backs[1]=str_replace('"/', '"'.HOME.'', $backs[1]);
$backs[1] = str_replace('actress', 'link/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);
}}
##################################
$titles = $titless[1];
include('../system/head.php');
include('../system/bar.php');
echo $out;
include('../system/foot.php');
?>