Jump to content

RSS Feed


zonetrap

Recommended Posts

I am working on some RSS feeds for my Wordpress website.
I was able to get one feed in with this code:

<phpcode>
<?php
$feedUrl = "http://www.pokernews.com/news/rss.xml#";
$maxItemsPerFeed = '99';
$showDetails = true;
$cacheName = "pokernews";
$filterCat='';
$tLimit = -1;
$dLimit = 10;
$noHTML = true;
$showTime = false;
$feedStyle = false;
$noTitle = true;
$showTimeGMT = true;
$titleImages = false;
$multiSiteTitle = false;
$makeRSS = false;
$rssLink="";

$feedOut = getSomeFeed($feedUrl, $maxItemsPerFeed, $showDetails,
$cacheName, $filterCat, $tLimit, $dLimit, $noHTML, $showTime,
$feedStyle, $noTitle, $showTimeGMT, $titleImages, $multiSiteTitle,
$makeRSS, $rssLink);

if ($feedOut)
echo $feedOut;
?>
</phpcode>

Is there a way to filter on a certain title. For example, if I know there will be a daily article titled "Hand Discussion", is there a way to just bring those articles in?
Link to comment
https://forums.phpfreaks.com/topic/11350-rss-feed/
Share on other sites

First, doesn't Wordpress have RSS out of the box? My experience with it suggests that it does. However if m you're trying to make a custom feed for whatever purpose then I think you need to make your question a little clearer. If by filter you mean recognize a specific string and then trigger the feed to be made then I would suggest something like this (to be executed upon submitting the article):
[code]
if (eregi($special_case, $article_title))
{
// make a rss feed or whatever
}
// down here you'll add the article to the DB
[/code]
If you meant something else please be a more specific so we can help you.
Link to comment
https://forums.phpfreaks.com/topic/11350-rss-feed/#findComment-42596
Share on other sites

You are correct, Buyocat, I needed to make it clearer.

I am pulling in a feed from another site, not altering the Wordpress feed of my posts.


The code I published before, is the feed Im getting from pokernews. If pokernews had a daily article titled, "Hand Discussion", how would I go about feeding that article only to my site? How can I limit which titles are fed to my site?
Link to comment
https://forums.phpfreaks.com/topic/11350-rss-feed/#findComment-42650
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.