'/usr/www/cache/', 'caching' => true, 'lifetime' => 86400, 'fileLocking' => true, 'writeControl' => true, 'readControl' => true, 'readControlType' => 'crc32', 'memoryCaching' => false, 'onlyMemoryCaching' => false, 'memoryCachingLimit' => 1000, 'fileNameProtection' => true, 'automaticSerialization' => true, 'automaticCleaningFactor' => 1, 'hashedDirectoryLevel' => 2, 'hashedDirectoryUmask' => 0700 ); $cache = & new Cache_Lite($cache_config); // print_r($rss); $webid = ($_GET['w'] ? $_GET['w'] : $ourwebid); $program = $_GET['p']; $camp = $_GET['c']; $galstyle = $_GET['st']; $framewidth = ($_GET['fw']) ? $_GET['fw'] : 500; if ($framewidth < 120) $framewidth = 120; $frameheight = ($_GET['fh']) ? $_GET['fh'] : 500; $headHeight = 37; $footHeight = 15; $headWidth = $footWidth = $baWidth = $framewidth; $baHeight = $frameheight - $headHeight - $footHeight; if (strtolower($_GET['img']) == "off" || strtolower($_GET['img']) == "false" || strtolower($_GET['img']) == "no" || strtolower($_GET['img']) == "f" || strtolower($_GET['img']) == "n" || strtolower($_GET['img']) == "0") { $images = false; } else { $images = true; } $limit = ($_GET['lim'] ? $_GET['lim'] : 15); $target = ($_GET['tr'] ? $_GET['tr'] : "_blank"); $imageheight = ($_GET['height']) ? $_GET['height'] : 100; $imagewidth = ($_GET['width']) ? $_GET['width'] : 70; $quality = ($_GET['quality']) ? $_GET['quality'] : 90; $background = ($_GET['background']) ? $_GET['background'] : "E0D8C8"; if (!$webid <> "") { $webid = "100342"; } if (!$program <> "") { $program = "2"; } if (!$camp <> "") { $camp = "0"; } switch (strtolower($galtype)) { case "fhg": $galtype = "fhg"; break; case "va": $galtype = "va"; break; default: $galtype = "both"; } switch (strtolower($galstyle)) { case "random": $galstyle = "random"; break; default: $galstyle = "latest"; } $querystring = ($_SERVER['QUERY_STRING'] != '') ? $_SERVER['QUERY_STRING'] . '&' : ''; $rssurl = "https://secure.gunzblazingpromo.com/iframe/gaydvd/feed.php?" . $querystring . "w=$webid&p=$program&c=$camp&lim=$limit"; //print $rssurl; $cacheid = 'm'.$webid . $program . $camp . $limit . $background . $querystring; if ($data = getCache($cacheid)) { // if(false){ echo $data; exit; } else { //print 'ok'; // include lastRSS include './lastRSS.php'; include_once('simple_html_dom.php'); // Create lastRSS object $rss = new lastRSS; // Set cache dir and cache time limit (1200 seconds) // (don't forget to chmod cahce dir to 777 to allow writing) $rss->cache_dir = 'cache'; //$rss->cache_dir = ''; $rss->cache_time = 0; $rss->cp = 'US-ASCII'; $rss->date_format = 'l'; $rss->CDATA = 'content'; //print $rssurl; if ($rs = $rss->get($rssurl)) { //print_r($rs); $itemcount = count($rs['items']); //echo $itemcount; if ($limit > $itemcount) { $limit = $itemcount; } $blockhmargin = 1; $blockvmargin = 1; $blockheight = 63; $blockwidth = 100; $blockdheight = 80; if ($images) { $blockheight = $blockheight + $imageheight; } $fblockwidth = $blockwidth + ($blockhmargin * 2); $fblockheight = $blockheight + ($blockvmargin * 2) + $blockdheight; $hitems = floor($baWidth / $fblockwidth); $vitems = floor($baHeight / $fblockheight); if ($limit <= ($hitems)) { $vitems = 1; $hitems = $limit; } $tpages = ceil($limit / ($hitems * $vitems)); if ($tpages == 1) { $scroller = false; } else { $scroller = true; } $afblockwidth = ($baWidth / $hitems); $afblockheight = ($baHeight / $vitems); $blockhmargin = ($afblockwidth - $blockwidth) / 2; $blockdheight = ($afblockheight - $blockheight - ($blockvmargin * 2)); ob_start(); ?>

get($cacheID, 'gdvdrss')) { return $data; } return false; } function setCache($data, $cacheID) { global $cache; $cache->save($data, $cacheID, 'gdvdrss'); } function truncateString($str, $max, $rep = '...') { if (strlen($str) > $max) { $leave = $max - strlen($rep); return substr_replace($str, $rep, $leave); } else { return $str; } } function html_truncateString($text, $max, $ending = '...') { $max = $max - strlen($ending); $done = false; $entity = false; $tag = false; $out = ""; $outCnt = 0; $textCnt = strlen($text); for ($i = 0; $i < $textCnt; $i++) { if ($entity) { if (!$done) $out .= $text[$i]; if ($text[$i] == ';') $entity = false; } else if ($tag) { $out .= $text[$i]; if ($text[$i] == '>') $tag = false; } else { switch ($text[$i]) { case '<': $tag = true; $out .= $text[$i]; break; case '&': $entity = true; /* break; */ default: if (!$done) if ($outCnt < $max) { $out .= $text[$i]; $outCnt++; } else { $done = true; $out .= $ending; } } } } return $out; } ?>