Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Make sure SimplePie is included. You may need to change this to match the location of autoloader.php
- // For 1.0-1.2:
- #require_once('../simplepie.inc');
- // For 1.3+:
- require_once('../../php/autoloader.php');
- // We'll process this feed with all of the default options.
- $feed = new SimplePie();
- $feed->set_cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache');
- // Set which feed to process.
- $feed->set_feed_url(array(
- 'http://www.nyaa.eu/?page=rss&term=subdesu+chocolate+mkv+720',
- 'http://www.nyaa.eu/?page=rss&term=subdesu++dakara+mkv+720'
- ));
- // Run SimplePie.
- $feed->init();
- // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).
- $feed->handle_content_type();
- // Let's begin our XHTML webpage code. The DOCTYPE is supposed to be the very first thing, so we'll keep it on the same line as the closing-PHP tag.
- ?>
- <?php foreach ($feed->get_items() as $item): ?>
- <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
- <channel>
- <title>Work</title>
- <link>http://cal5not.dyndns.tv:8080/</link>
- <atom:link href="http://cal5not.dyndns.tv:8080/DEV/transmission/test4.php" rel="self" type="application/rss+xml"/>
- <description/>
- <item>
- <title><?php echo $item->get_title(); ?></title>
- <![CDATA[<?php echo $item->get_description(); ?>]]>
- <link><?php echo $item->get_link() ; ?></link>
- <guid><?php $guid = $item->get_item_tags('','guid'); $data = $guid[0]['data']; echo "$data"; ?></guid>
- <pubDate><?php echo $item->get_date('j F Y | g:i a'); ?></pubDate>
- </item>
- </channel>
- </rss>
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement