$random"; }; // function buildFlirtpowerLink(){ function random_array_element($a){ mt_srand((double)microtime()*1000000); // get all array keys: $k = array_keys($a); // find a random array key: $r = mt_rand(0, count($k)-1); $rk = $k[$r]; // return the random key (if exists): return isset($a[$rk]) ? $a[$rk] : ''; }; // function random_array_element($a){ // $text_to_highlight = highlight_this($text_to_highlight, $search_text); function highlight_this($text, $words) { $words = trim($words); $wordsArray = explode(' ', $words); foreach($wordsArray as $word) { if(strlen(trim($word)) != 0){ $text = str_ireplace($word, "".strtoupper($word)."", $text); }; }; return $text; }; // function highlight_this($text, $words) { // get Balken color function getBalkenColor(){ $rand = rand(1,4); if ( $rand == 1 ){ return "barGreen.gif"; } elseif ( $rand == 2 ){ return "barGreen2.gif"; } elseif ( $rand == 3 ){ return "barYellowGreen.gif"; } elseif ( $rand == 4 ){ return "barYellow.gif"; } elseif ( $rand == 5 ){ return "barYellowOrange.gif"; } elseif ( $rand == 6 ){ return "barOrangeRed.gif"; } elseif ( $rand == 7 ){ return "barRed.gif"; } elseif ( $rand == 8 ){ return "barRed2.gif"; } else { return "barGreen2.gif"; }; }; // function getBalkenColor(){ // print out the tag cloud function printTagCloud($tags) { // $tags is the array $NoDoubleTags = array(); $min_size = 11; // min font size in % $max_size = 36; // max font size in % $pattern = "(\.com|\.net|\.de|\.to|\.+[a-z]|\s+com|\s+net|\s+de|\s+to|www)"; # match a domain // Mod begin $DESC_last = ""; $len_last = 0; // Mod end echo <<

Fresh Torrent News

'; }; # function printTagCloud($tags,$catg) { // add plus signs between strings where once space signs have been function title_plus( $string ){ $string = deleteSpecialChars($string); # sonderzeichen entfernen: security.inc.php $string = preg_replace('/\s\s+/', '+', $string); $string = preg_replace('/\++/', '+', $string); $string = ereg_replace("[ \t\n\r]+", "+", $string); $tmp = $string; $flet = substr($tmp, 0,1); # get first char $last = $tmp[strlen($tmp)-1]; # get last char if ( preg_match("/\+/", $flet ) ) { #echo "PLus sign in front\n"; $string = substr($string, 1); }; if ( preg_match("/\+/", $last ) ) { #echo "PLus sign at last\n"; $string = substr_replace($string ,"",-1); # remove last char from string }; return $string; }; # function title_plus7( $string ){ // reduce more than one space character to exact one space char function trim_spaces( $string ){ $string = preg_replace('/\s\s+/', '+', $string); $string = preg_replace('/\++/', '+', $string); $string = ereg_replace("[ \t\n\r]+", "+", $string); $tmp = $string; $flet = substr($tmp, 0,1); # get first char $last = $tmp[strlen($tmp)-1]; # get last char if ( preg_match("/\+/", $flet ) ) { #echo "PLus sign in front\n"; $string = substr($string, 1); }; if ( preg_match("/\+/", $last ) ) { #echo "PLus sign at last\n"; $string = substr_replace($string ,"",-1); # remove last char from string }; return str_replace("+"," ",$string); }; # function trim_spaces( $string ){ // helper function for file_backread() function __file_backread_helper(&$haystack,$needle,$x) { $pos=0;$cnt=0; while( $cnt < $x && ($pos=strpos($haystack,$needle,$pos)) !==false ){$pos++;$cnt++;} return $pos==false ? false:substr($haystack,$pos,strlen($haystack)); }; # function __file_backread_helper(&$haystack,$needle,$x) { // read last given number of lines from file function file_backread($file,$lines,&$fsize=0){ $f=fopen($file,'r'); if(!$f)return Array(); $splits=$lines*50; if($splits>10000)$splits=10000; $fsize=filesize($file); $pos=$fsize; $buff1=Array(); $cnt=0; while($pos) { $pos=$pos-$splits; if($pos<0){ $splits+=$pos; $pos=0;} fseek($f,$pos); $buff=fread($f,$splits); if(!$buff)break; $lines -= substr_count($buff, "\n"); if($lines <= 0) { $buff1[] = __file_backread_helper($buff,"\n",abs($lines)+1); break; } $buff1[] = $buff; } # return str_replace("\r",'',implode('',array_reverse($buff1))); return implode('',array_reverse($buff1)); }; # function file_backread($file,$lines,&$fsize=0){ // get current full url function selfURL(){ if(!isset($_SERVER['REQUEST_URI'])){ $serverrequri = $_SERVER['PHP_SELF']; } else{ $serverrequri = $_SERVER['REQUEST_URI']; }; $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return "http://".$_SERVER['SERVER_NAME'].$port.$serverrequri; }; # function selfURL(){ // generate html tail of web document function GenerateTail(){ $CloundTagCountEnries = 35; $KeyWordStoreDir = date("n.Y"); $KeywordDate = date("j.n.Y"); $FileStorePath = LOGLINKSSTORE."/" . $KeyWordStoreDir ."/". $KeywordDate . ".".LOGNORMALSUFIX.".txt"; // linux version $stringCloud = file_backread($FileStorePath, $CloundTagCountEnries+1); // functions.inc.php $arrayCloud = explode("\n",$stringCloud ); shuffle($arrayCloud); printTagCloud($arrayCloud); // functions.inc.php und normale suchanfragen verlinken /* echo <<

Latest indexed Torrent Files

"; */ $currentmonate = mktime(0, 0, 0, date("m"), date("j"), date("Y")); $einsbackmonate = mktime(0, 0, 0, date("m")-1, date("j"), date("Y")); $zweibackmonate = mktime(0, 0, 0, date("m")-2, date("j"), date("Y")); $eins = date("m-Y", $currentmonate); $zwei = date("m-Y", $einsbackmonate); $drei = date("m-Y", $zweibackmonate); echo <<

Copyright 2010 TorrentRage.com All rights reserved.

  • Torrent RSS Feeds
  • TorrentRage on Twitter
END; return 1; }; # function GenerateTail(){ // get the foundon link function foundon($url){ $array = parse_url($url); return $array['path']; }; # function foundon($url){ ?>