Releasy z nForce.nl
Mod ten pokazuje, jaki są ostatnio wydane release na stronie nforce.nl. Korzysta on z plików xml
1.Utwórz plik nforce.php i dodaj do niego kod:
<?php ob_start("ob_gzhandler"); require_once("include/bittorrent.php"); dbconn(true); stdhead(); include './lastRSS.php'; // create lastRSS object $rss = new lastRSS; // setup transparent cache $rss->cache_dir = './newsCache'; $rss->cache_time = 3600; // one hour ?> <h2>Ostatnie release na nforce.nl</h2> <table width=100% border="1" cellspacing="0" cellpadding="10" class="stats" background=images/mainbox_bg.jpg><tr><td align=center> <table cellspacing="0" cellpadding="5" border="0" class=main border=1> <tr> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release DVD</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_18.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release SVCD</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_15.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> </tr> <tr> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release w kategorii Tv-Rip</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_19.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release XXX</strong></td> </tr> </table> <font size="1"> <? $max = 0; if ($rs = $rss->get('http://www.nforce.nl/rss/rss_17.xml')) { foreach($rs['items'] as $item) { if ($max >= 10) { break; } echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; $max++; } } else { print ('Error: NForce not reachable...'); } ?> </td> </tr> <tr> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong> PS2</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_9.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release na konsolę xBox</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_11.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> </tr> <tr> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release w kategori PC/ISo</strong></td> </tr> </table> <font size="1"> <? if ($rs = $rss->get('http://www.nforce.nl/rss/rss_2.xml')) { foreach($rs['items'] as $item) { echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; } } else { print ('Error: NForce not reachable...'); } ?> </td> <td width="50%" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="upper"><strong>Ostatnie release w kategori Programy/PC ISO</strong></td> </tr> </table> <font size="1"> <? $max = 0; if ($rs = $rss->get('http://www.nforce.nl/rss/rss_6.xml')) { foreach($rs['items'] as $item) { if ($max >= 10) { break; } echo "<a href=\"$item[link]\">".$item['title']."</a><br>\n"; $max++; } } else { print ('Error: NForce not reachable...'); } ?> </td> </tr> </table> </td></tr></table> <? stdfoot(); ?> |
2.Utwórz plik lastRSS.php i dodaj do niego kod:
<?php 'webMaster', 'lastBuildDate', 'rating', 'docs'); |
3.Screen:
Tłumaczenie: Kuba1530
Mod napisany przez Wilba
- Wersja do wydruku
- Zaloguj się lub zarejestruj by odpowiadać
Ostatnie odpowiedzi
11 lat 36 tygodni temu
11 lat 36 tygodni temu
11 lat 41 tygodni temu