<?php header('Content-type: application/xml; charset=UTF-8'); require_once 'rss_feed.php'; // configure appropriately require_once 'simplehtmldom/simple_html_dom.php'; // set more namespaces if you need them $xmlns = 'xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:atom="http://www.w3.org/2005/Atom"'; // configure appropriately - pontikis.net is used as an example $a_channel = array("title" => "Kun.uz", "link" => "http://kun.uz/", "description" => "КУННИНГ АСОСИЙ ЯНГИЛИКЛАРИ", "language" => "uz_l", "image_title" => "mehnat.uz", "image_link" => "http://kun.uz/", "image_url" => "https://kun.uz/images/stationary/logo.png"); $site_url = 'http://kun.uz/'; // configure appropriately $site_name = 'http://kun.uz/'; // configure appropriately $datas = json_decode(@file_get_contents("http://app.kun.uz/mobapi/post/index?type=main&lang=uz_l"), true)['data']; $rss = new rss_feed($datas, $xmlns, $a_channel, $site_url, $site_name, true); echo $rss->create_feed();
// error_reporting(E_ALL); // http://www.disobey.com/detergent/2002/extendingrss2/ @define('RSS_UTM_ACTIVE', 'false'); @define('RSS_UTM_SOURCE', 'rss'); @define('RSS_UTM_MEDIUM', 'rssfeed'); @define('RSS_UTM_TERM', ''); @define('RSS_UTM_CONTENT', ''); @define('RSS_UTM_CAMPAIGN', ''); @define('RSS_BUYNOW_LINK', 'false'); @define('RSS_DEFAULT_IMAGE_SIZE', 'small'); // \'small\', \'medium\', \'large\' @define('RSS_CACHE_TIME', '10'); @define('DIR_FS_RSSFEED_CACHE', DIR_FS_SQL_CACHE); @define('RSS_ERROR_CACHE_DIR', 'Cache directory not found "' . DIR_FS_RSSFEED_CACHE . '"'); require_once DIR_WS_CLASSES . 'rss_feed.php'; $rss = new rss_feed(); if (RSS_CACHE_TIME > 0) { $rss->rssFeedCahcheSet(true); } else { $rss->rssFeedCahcheSet(false); } $rss->rss_feed_encoding(CHARSET); $rss->rss_feed_content_type('text/xml'); // 'application/rss+xml' $rss->rss_feed_set('ttl', RSS_TTL); if (!$rss->rss_feed_cache($_SERVER['QUERY_STRING'], RSS_CACHE_TIME * 60)) { // Google Base and Custom Namespaces - http://base.google.com/support/bin/answer.py?answer=58085 $rss->rss_feed_xmlns('xmlns:g="http://base.google.com/ns/1.0"'); $rss->rss_feed_xmlns('xmlns:c="http://base.google.com/cns/1.0"'); // "Ecommerce RSS" Module Specification (ERSS) - http://shopping.discovery.com/erss/ // $rss->rss_feed_xmlns('xmlns:ecommerce="http://shopping.discovery.com/erss');
<?php header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: application/xml; charset=utf-8'); require_once 'rss_feed.php'; // configure appropriately // set more namespaces if you need them $xmlns = 'xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"'; $site_url = 'http://www.blogzinga.it'; $site_name = 'La lista dei blog di programmatori italiani. By CoseNonJaviste'; $a_channel = array("title" => "BlogZinga!", "link" => $site_url, "description" => $site_name, "language" => "it"); $json = file_get_contents('https://raw.githubusercontent.com/cosenonjaviste/blogzinga/master/blogs.json'); $rss = new rss_feed($xmlns, $a_channel, $site_url, $site_name); echo $rss->create_feed(filterJson(json_decode($json))); function filterJson($json) { $lastTen = array_slice($json, count($json) - 10); return array_reverse($lastTen); }
// time to live - time after reader should refresh the info in minutes define('RSS_STRIP_TAGS', 'true'); define('RSS_IMAGE', 'favicon.ico'); define('RSS_IMAGE_NAME', STORE_NAME); if (RSS_STRIP_TAGS == 'false') { define('CDATA_OPEN', "<![CDATA["); define('CDATA_CLOSE', "]]>"); } else { define('CDATA_OPEN', ""); define('CDATA_CLOSE', ""); } define('RSS_GENERATOR', 'VaM Shop RSS 2.0 Feed'); define('RSS_CONTENT_COPYRIGHT', 'Copyright © ' . date('Y') . ' ' . STORE_OWNER); /*--------- END OF CONFIGURATION ------------------*/ // $rss = new rss_feed('xmlns:dc="http://purl.org/dc/elements/1.1/"'); $rss = new rss_feed(); // $rss->rss_feed_xmlns('xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"'); // $rss->rss_feed_xmlns('xmlns:admin="http://webns.net/mvcb/"'); // $rss->rss_feed_xmlns(array('xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"', 'xmlns:content="http://purl.org/rss/1.0/modules/content/"')); // $rss->rss_feed_style('rss.css', 'text/css'); $rss->rss_feed_style('rss.xsl', 'text/xsl'); $rss->rss_feed_description_set(RSS_FEED_DESCRIPTION, RSS_FEED_DESCRIPTION_CHARACTERS); $rss->rss_feed_set('encoding', $_SESSION['language_charset']); $rss->rss_feed_set('content_type', 'text/xml'); $rss->rss_feed_set('title', STORE_NAME); $rss->rss_feed_set('link', HTTP_SERVER . DIR_WS_CATALOG); $rss->rss_feed_set('description', STORE_NAME_ADDRESS); $rss->rss_feed_set('lastBuildDate', date('r')); $rss->rss_feed_set('generator', RSS_GENERATOR); $rss->rss_feed_set('copyright', RSS_CONTENT_COPYRIGHT); $rss->rss_feed_set('managingEditor', STORE_OWNER_EMAIL_ADDRESS . " (" . STORE_OWNER . ")");
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// define('RCMS_ROOT_PATH', './'); require_once RCMS_ROOT_PATH . 'common.php'; require_once SYSTEM_MODULES_PATH . 'rss.php'; if (!empty($_GET['m']) && !empty($system->config['enable_rss']) && !empty($system->feeds[$_GET['m']])) { $module = $_GET['m']; $mod = $module; header('Content-Type: text/xml'); $feed = new rss_feed($system->config['title'] . ' - ' . $system->feeds[$module][0], 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'] . basename($_SERVER['SCRIPT_NAME'])) . '?module=' . str_replace('@', '&c=', $mod), $system->feeds[$module][1], $system->config['encoding'], $system->config['language'], $system->config['copyright']); $m = !empty($system->feeds[$module][2]) ? $system->feeds[$module][2] : $module; if (is_readable(MODULES_PATH . $m . '/rss.php')) { include MODULES_PATH . $m . '/rss.php'; } $feed->showFeed(); }