-
Notifications
You must be signed in to change notification settings - Fork 4
/
rsstfreak.php
36 lines (30 loc) · 1.27 KB
/
rsstfreak.php
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
<?php
/**
* http://btdev.net:1337/svn/test/Installer09_Beta
* Licence Info: GPL
* Copyright (C) 2010 BTDev Installer v.1
* A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
* Project Leaders: Mindless,putyn.
**/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require_once(INCL_DIR.'html_functions.php');
require_once(INCL_DIR.'user_functions.php');
dbconn();
loggedinorreturn();
$htmlout='';
$lang =load_language('global');
$use_limit = true;
$limit = 15;
$xml = file_get_contents('http://feed.torrentfreak.com/Torrentfreak/');
preg_match_all('/\<(title|pubDate|dc:creator|link|description)\>(.+?)\<\/\\1\>/i',$xml,$out,PREG_PATTERN_ORDER);
$feeds = $out[2];
$c = count($feeds);
$html = begin_main_frame().begin_frame('Torrent Freak news');
for($i=5;$i<$c;$i+=5) {
$html .= '<h3><u>'.$feeds[$i].'</u></h3><font class="small">by '.$feeds[$i+3].' on '.$feeds[$i+2].'</font><br/><p>'.str_replace(array('<![CDATA[',']]>'),'',$feeds[$i+4]).'</p><br/><a href="'.$feeds[$i+1].'" target="_blank"><font class="small">Read more</font></a>';
if($use_limit && $i >= ($limit*5))
break;
}
$html .= end_frame().end_main_frame();
print(stdhead('Torrent freak news').$html.stdfoot());
?>