hier ein Link :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | <? # script and copyright by Patriot1980 # for ilch clan script V 1.1 # rss_news_box Version 1.1.0 $ENABLE_CACHING = true; //Bevore ihr das caching aktiviert ($ENABLE_CACHING = true;) schaut ob die CACHE_FILE korrekt angelegt ist $CACHE_FILE = '/tmp/cachefile.rdf'; //Hier der Pfad zu Eurer CACHE_FILE. Vergesst nicht die Rechte im FTP für diese Datei auf Schreiben zu setzen $CACHE_REFRESH_TIME = 20; //Cache timeout in Minuten $MAX_NEWS = 7; //Hier könnt Ihr die Anzahl der Headlines die gelistet werden sollen setzen if ($ENABLE_CACHING){ $cache_diff =(time() - @filemtime($CACHE_FILE))/60; if (!file_exists($CACHE_FILE) or ($cache_diff > 20) ){ $fcontents = join ('', @file ('http://www.ps4-magazin.de/index.php?page=mfrontNewsFeed')); //Hier kommt Euer gewünschtes RSS hinein @unlink($CACHE_FILE); $handle = @fopen($CACHE_FILE, 'x+'); @fwrite($handle, $fcontents); @fclose($handle); } $fcontents = join ('', @file ($CACHE_FILE)); } else { $fcontents = join ('', @file ('http://www.ps4-magazin.de/index.php?page=mfrontNewsFeed')); //Hier nochmal das gewünschte RSS hinein } $fcontents = str_replace ("</item>", "", $fcontents); $fcontents = str_replace ("</link>", "", $fcontents); $splices = explode ("<item>", $fcontents); if (count($splices) > $MAX_NEWS){ $stop_at = $MAX_NEWS+1; } else { $stop_at = count($splices); } //setzt an dieser Stelle einen Banner der RSS Newsseite ein, ersetzt include/images/news/heise_online_h50.gif mit Eurem Banner, nicht vergessen Banner hochzuladen und Link zu ändern! print '<br /><center /><a href="http://www.ps4-magazin.de/" title="heise online" target="_blank" /><img src="include/images/news/heise_online_h50.gif" border="0" align="top" alt="heise online" /></a /><br /></center /><br>'; //ab hier muss nichts geändert werden $out_buffer = '<span class="heisenews">'; for ($i = 1; $i < $stop_at; $i++){ $link = explode("<link>",$splices[$i]); $link[1] = strip_tags($link[1]); $headline = str_replace ("<title>", '<a href="' . trim($link[1]) . '" target="_blank" class="heiseheadline">', $splices[$i]); $headline = str_replace ("</title>", "</a>", $headline); $headline = explode ("<link>", $headline); $headline = $headline[0]; $out_buffer = $out_buffer . $headline . '<br /><font size="1" color="red" />--------------------------------------------------------------</font /><br />'; } $out_buffer = $out_buffer . "</span>"; print utf8_decode($out_buffer); ?> <p><center> <center></p> |
verwendete ilch Version: 1.1 P
betroffene Homepage: destinyofgermany.com/index.php