This is a discussion on About RSS feed integration within the Coding Help forums, part of the Webmaster Help category; Hi folks, I'm prepared publishing RSS feed from other websites w/o modified but have no idea how to start. On ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi folks, I'm prepared publishing RSS feed from other websites w/o modified but have no idea how to start. On Internet browsing I discovered some websites mentioning "sign the contract and you'll have news publishing on your website in 5 minutes". I hesitate whether it would be so easy. Just signing the contract and providing them email address and my website URL then I'm done. I built my website on HTML, CSS and Javascript. I have text scroller/marquee running on the website built on javascript modified on Cross Browser marquee; Dynamic Drive DHTML Scripts- Cross Browser marquee and Cross Browser marquee II; Dynamic Drive DHTML Scripts- Cross Browser marquee II I don't know whether I can make use of them to run news. If YES, can you advise how to integrate them to the RSS feed websites? TIA B.R. satimis |
| |||||
| Not quite clear what you want to do here , If you want to set up an Rss feed on your site. have a look at this post http://www.irishwebmasterforum.com/c...rss-feeds.html |
| ||||
| Quote:
Thanks for your URL. Actually I'm confused. What I need is to integrate RSS feed news to my website which is hoisted on my own server, so that visitors while browsing my website can read news on their PCs. I have been googling a couple days reading many articles on Internet. But the more I read more confused I'm. I don't know whether I need an aggregator only. I'm not prepared to modify the feed news nor to add news to the feed. If the feeds include vedio clips can the visitors display vedio on their PCs? I have scoller/text marquee running on my website. The same is modified on; Cross Browser marquee Cross Browser marquee II Dynamic Drive DHTML Scripts- Cross Browser marquee Dynamic Drive DHTML Scripts- Cross Browser marquee II They are written in javascript. Whether I can make use of them. If YES, then HOW? TIA B.R. satimis |
| |||||
| I use the lastRSS download it from Last RSS - PHP RSS parser/reader the zip contains one file lastRSS.php upload this unchanged to your php enabled server.now go to the page you want to display feeds on and place the following code where you want to display the feed. Code: <?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>
modify the above code to suit your needs i mean feeds . JS marquee cant help you there , fire away with the above let us know how you get on. Mick |
| ||||
| Quote:
On which directory shall I install "ast RSS-PHP RSS parser"? On /var/www/my_webpage.index.html ? I'm running Ubuntu 7.04 server amd64. This is a test. I have only a single page my_webpage.index.html On where shall I copy your code? <body>your code</body>? If saving the webpage as .php NOT .html can visitor evokes it on browsing my site? Thanks B.R. satimis |
| ||||
| Quote:
Download "lastRSS.zip" (Last RSS-PHP RSS parser/reader) on; Last RSS - PHP RSS parser/reader unzip the package $ sudo mv lastRSS.php /var/www/ $ sudo nano /var/www/index.html typing your php script on <body> </body> and saving the file as "index.php" $ ls /var/www/ | grep index index.php On a workstation brower It displays following news line on the webpage; Code: RTÉ Sport - GAA News Latest Irish and international news supplied by RTE.ie
Havd following questions; 1) The news lines are static. How to make the news lines scrolling on a box? 2) Can I add another RSS feed? I.E. 2 feeds on the same webpage? 3) OR if 2) above is impossible, then how to change the feed? TIA B.R. satimis |
| ||||
| Quote:
Quote:
Quote:
No marquee container/box displayed and no text scrolling. All texts below this script are pushed to the right, leaving half page on the left of the webpage empty. Script Code: <?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
'http://www.freshfolder.com/rss.php'
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>
Edit: Would my existing marquee cause the problem? B.R. satimis Last edited by satimis; 12-03-2008 at 01:31 PM. |
| |||||
| for the scroller you will need to remove the right side feeds remove these two lines from the php code Code: foreach ($rss_right as $url) ShowOneRSS($url); echo '</td></tr></table>'; Remove the above 2 lines of code its near the bottom of the PHP script. in the <body> Put Code: <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;"> place the complete php script here </div> </div> needs a bit of CSS to spruce it up a bit OK |
| Tags |
| feed, integration, rss |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rss feed or newsletter | Busarus | Webmaster Discussion | 4 | 02-03-2007 09:29 PM |
| Need RSS Feed Help | Gavin | Blogs & Blogging | 4 | 12-02-2007 01:31 PM |
| 1 Bag of RSS feed: 100% RDA of internet. Warning: may contain nut traces. | gary.b | General Chat | 15 | 29-01-2007 10:03 PM |
| incorporating phpadsnew into an rss feed | Busarus | Coding Help | 10 | 23-10-2006 06:04 PM |
| rss feed | louie | General Chat | 0 | 29-04-2006 08:18 PM |