Ejemplo n.º 1
0
function expand($url)
{
    try {
        $feed = new RssFeed($url);
        echo $feed->displayPosts();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    exit;
}
Ejemplo n.º 2
0
 public function index()
 {
     $this->View->setAutorender(false);
     $site = Config::get('project.url');
     $author = Config::get('project.owner');
     $Rss = new RssFeed();
     $Rss->setTitle(Config::get('project.name'));
     $Rss->setDescription(Config::get('project.desc'));
     $Rss->setDate(date('Y-m-d H:i:s', strtotime('-2 day')));
     $Rss->setLink($site);
     $data = array();
     foreach ($data as $row) {
         $Item = new RssItem();
         $Item->setTitle('title');
         $Item->setDescription('description');
         $Item->setDate('2010-12-25 00:00:00');
         $Item->setAuthor('no@email.com (' . Config::get('project.owner') . ')');
         $Item->setLink(Config::get('project.url'));
         $Rss->addItem($Item);
     }
     echo $Rss->spit();
 }
Ejemplo n.º 3
0
<?php

include '../classes/RssFeedItem.php';
include '../classes/RssFeed.php';
include '../config/config.inc.php';
include '../config/db_connect.inc.php';
include_once 'CCirculation.inc.php';
include '../language_files/language.inc.php';
$language = $_REQUEST['language'];
$archivemode = $_REQUEST['archivemode'];
$sortDirection = $_REQUEST['sortDirection'];
$sortby = $_REQUEST['sortby'];
$start = $_REQUEST['start'];
$nShowRows = $_REQUEST['nShowRows'];
//http://cuteflowbranch/pages/todo_feed.php?language=de&archivemode=0&start=1&nShowRows=50&sortby=COL_CIRCULATION_PROCESS_DAYS&sortDirection=DESC&uid=1
$objRssFeed = new RssFeed();
$objCirculation = new CCirculation();
$arrCirculationOverview = $objCirculation->getCirculationOverview($start, $sortby, $sortDirection, $archivemode, 50, 0, '', false, false, $_REQUEST['uid']);
foreach ($arrCirculationOverview as $item) {
    $feed_item = new RssFeedItem();
    $feed_item->setTitle($item['strName']);
    $nCirculationFormID = $item['nID'];
    $nSenderID = $item['nSenderId'];
    $strTitle = $item['strName'];
    $nMailingListId = $item['nMailingListId'];
    if ($item['strCurStation'] != '') {
        $strCurStation = $item['strCurStation'];
    }
    $arrDecissionState = $objCirculation->getDecissionState($nCirculationFormID);
    $strStartDate = $objCirculation->getStartDate($nCirculationFormID);
    $strSender = $objCirculation->getSender($nCirculationFormID);
Ejemplo n.º 4
0
	public function __construct($url) {
		parent :: __construct($url);
	}
Ejemplo n.º 5
0
 /**
  * Create the RSS-Feed
  */
 function createRSS()
 {
     \Env::get('ClassLoader')->loadFile(ASCMS_MODULE_PATH . '/Jobs/Controller/RssFeed.class.php');
     $rssFeed = new RssFeed();
     $rssFeed->channelTitle = "Jobsystem";
     $rssFeed->channelDescription = "";
     $rssFeed->xmlType = "headlines";
     $rssFeed->createXML();
     $rssFeed->xmlType = "fulltext";
     $rssFeed->createXML();
 }
Ejemplo n.º 6
0
<?php

/**
 * Created by PhpStorm.
 * User: Thomas MEDARD
 * Date: 11/12/15
 * Time: 16:12
 */
require_once 'utils/startend.php';
require_once 'objetphp/rssFeed.php';
$scripts = array();
head('Test', 'salut les coco', 'projet, test, php, yolol', '', $scripts);
echo '<h1 id="titre">Test RSS</h1>';
echo 'Tete <br/>' . "\n";
echo "Salut";
$flux = new RssFeed('http://www.lemonde.fr/m-actu/rss_full.xml');
echo "look\n";
$rssPosts = $flux->getRssPosts();
foreach ($rssPosts as $valeur) {
    echo $valeur . "<br/><br/>\n";
}
echo '        <a id="ancrage" href="#"><img src="static/images/ancrage.png"  width="200" height="200" alt="retour en haut"/></a>';
foot();
Ejemplo n.º 7
0
<?php

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
include_once 'RssFeed.php';
$config_ini = parse_ini_file("Config.ini", true);
$rssFeed = new RssFeed($_GET['rssFeed'], $config_ini['main_config']['url']);
$getRssFeeds = $rssFeed->getRssFeed();
include_once 'layout.php';
Ejemplo n.º 8
0
 public function start_aggregation()
 {
     $this->log('<<<<<<<<<<<<<<<<<<<<<<<<<< start aggregation..');
     // increasing maximum execution time to 3 min for this part, it can take more time
     // than the default 30 secs for the images to be downloaded and processed by PHP/WP..
     // set_time_limit(180);
     $feed_enabled = false;
     // fetch from Facebook..
     $options = get_option('facebook_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $fb = new FacebookFeed();
         $result = $fb->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'facebook']);
         }
     }
     // fetch from Twitter..
     $options = get_option('twitter_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $tw = new TwitterFeed();
         $result = $tw->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'twitter']);
         }
     }
     // fetch from Instagram..
     $options = get_option('instagram_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $in = new InstagramFeed();
         $result = $in->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'instagram']);
         }
     }
     // fetch from YouTube..
     $options = get_option('youtube_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $yt = new YouTubeFeed();
         $result = $yt->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'youtube']);
         }
     }
     // fetch from Vimeo..
     $options = get_option('vimeo_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $vim = new VimeoFeed();
         $result = $vim->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'vimeo']);
         }
     }
     // fetch from RSS Feed..
     $options = get_option('rss_page');
     if (isset($options[$this->prefix . 'enabled'])) {
         $feed_enabled = true;
         $rss = new RssFeed();
         $result = $rss->getFeed($options);
         if ($this->feed_error($result)) {
             return $result['message'];
         } else {
             $this->save_feed_items($result, $this->sections[$this->prefix . 'rss']);
         }
     }
     $this->log('>>>>>>>>>>>>>>>>>>>>>>>>>> aggregation complete..!');
     if (!$feed_enabled) {
         return 'No social feeds are enabled. <a href="edit.php?post_type=' . $this->post_type . '&page=' . $this->settings_slug . '">Enable some feeds.</a>';
     }
 }