Unstoppable Domains โ€” Expired Auctions

How to make RSS available for fans of an html site

NamecheapNamecheap
Watch

dan_Vt

Established Member
Impact
13
If I've got a site all coded in html (extensions of all pages are .php for other purposes) is it possible to have an RSS feed for the site? Or maybe just one page of it? How would that be done?

When I search around for rss stuff I get more articles about pulling rss into your site, but I want to have a feed for my site so people can add it to things like My Yahoo.

Help appreciated.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
hey can do this, do you have msn or pm me?
 
0
•••
Why not just post here, I would like to know too!

localhost said:
hey can do this, do you have msn or pm me?
 
0
•••
becuase its more of a paid project due to the fact it depends on the site.

Can do for anyone $5.
 
0
•••
I'm looking for information before I pay anyone. Information is continually added, I don't want to have to keep paying someone. I can do it myself, just looking for some decent links to sites that might be able to teach me how.
 
0
•••
Hm, pure HTML - nothing stored in a database or anything?

I can think of a few ways to make the content available through RSS w/o one, I may post an example in a bit.
 
0
•••
SecondVersion said:
Hm, pure HTML - nothing stored in a database or anything?

I can think of a few ways to make the content available through RSS w/o one, I may post an example in a bit.

Yeah...html, but with .php extensions to use some php stuff.
 
0
•••
untested..but..
PHP:
<?php

// Will hold the RSS content
$rss = '';

// Your domain
$domain = $_SERVER['SERVER_NAME'];

// Main description (for the channel)
$domaindescr = '';

// You can put files you want ignored here
$ignore = array();

// File extension
$fileext = 'php';

// How many to show in the RSS
$limit = 10;

// By default, this is the directory wherever this file is placed (site root)
$dir = dir('.');

// This will hold valid files
$files = array();

$i = 0;

while (false !== ($file = $dir->read()) AND $i <= $limit)
{
	if (is_file($file) AND !in_array($file, $ignore) AND preg_match("#(.*?)\.$fileext$#i", $file))
	{
		array_push($files, $file);
	}
	$i++;
}

$dir->close();

if (count($files))
{
	foreach ($files AS $file)
	{
		$meta = get_meta_tags($file);
		$pubdate = gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT');
		$rss .= "\t\t<item>\n\t\t\t<title>$meta[title]</title>\n\t\t\t<link>http://www.$domain/$file</link>\n\t\t\t<description><![CDATA[$meta[description]]]></description>\n\t\t\t<pubDate>$pubdate</pubDate>\n\t\t</item>\n";
        $rss = trim($rss);
	}
}
else
{
	$rss .= "\t\t<item>\n\t\t\t<title>No entries in this feed.</title>\n\t\t\t<link>http://www.$domain</link>\n\t\t\t<description><![CDATA[No entries in this feed. You can view the full site at <a href=\"http://www.$domain\">$domain</a>]]></description>\n\t\t</item>\n";
}

header('Content-Type: text/xml; charset=ISO-8859-1');
echo '<?xml version="1.0" encoding="ISO-8859-1"?>';
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n<rss version=\"0.91\">\n<channel>\n\t<title>$domain</title>\n\t<link>http://www.$domain</link>\n\t<description><![CDATA[$domaindescr]]></description>\n$rss\n</channel>\n</rss>";

?>
 
1
•••
SecondVersion said:
untested..but..

Wow!

So, couple questions. Let's say I have multiple channels, and I'm putting new content up. Do I update this every time? What if I just want a synopsis? Where does the file go?

I'm an rss neophyte (can't you tell?)

Thanks for taking the time to put that up.
 
0
•••
I am not sure I get it, so I would put that code into whatever page I wanted it on, and it would automatically update a certain news feed of my choice and display it on that page?

If so, then how would I pick the feed I want to display?

If not, how does it work?

Thanks for the snipet of code though!
 
0
•••
UneekTT said:
I am not sure I get it, so I would put that code into whatever page I wanted it on, and it would automatically update a certain news feed of my choice and display it on that page?

If so, then how would I pick the feed I want to display?

If not, how does it work?

Thanks for the snipet of code though!
This isn't for displaying rss on your site, its for making your content available via rss to others.
 
0
•••
I'll make a post with the code for it to do multiple, in a bit (whenever I get the time). :)
 
0
•••
dan...

since you have been researching RSS things...
maybe you saw this out there somewhere...

I am trying to findout how to do whatever needs to be done
to make an INCOMING RSS be able to archive the posts into WP posts...
whenever I revisit the blog and refresh the page - so the existing posts archive and the new ones are pulled in and become new posts in the blog...

any suggestions of a tutorial page for that... ??
or anyone you know - that knows how to teach me that... ??

thanks...

~DomainBELL (Patricia)

p.s. I don't know the answer to your question or I would help you...
Good Luck...
 
0
•••
I cant get the code snippet to work, can you post a few bullet point instructions please?

If not, I have permission from a friend to syndicate their blog onto one of my domains.

Basically I want to take their Feedburner RSS and put it inside a web template to make it look like it is all my site.

When they post in their Blogspot blog my site will get the update content.

how best to do this?
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back