Electronic Content Syndication Methods
When it comes to syndicating electronic content, two main syndication methods are employed:
-
Delivering content directly to readers.
-
Delivering content to publishers.
To syndicate, in the sense of syndicating articles or other content, means to simultaneously publish in a number of different publications. For electronic content, the publications are likely to be web sites.
"Delivering content directly to readers" is not actually syndication, because syndication implies publishing in a number of publications, which are then read by readers. However, with the popularity of RSS and Atom, delivering content directly to the reader is sometimes thought to be syndication.
"I think we should probably stop calling it syndication" at http://www.kottke.org/04/04/syndication-misnomer is a blog that talks about that very thing.
If you're interested in alternate methods of delivering content directly to readers, and would like to give RSS (or Atom, a similar technology) a try, http://www.mnot.net/rss/tutorial/ can provide some information. Googling for "RSS tutorial" will reveal more web pages.
"Delivering content to publishers" is the syndication this article is about.
It addresses four methods. None is perfect. But one will tickle your fancy more than the others do.
1. RSS and Atom
RSS and Atom can be used to syndicate headlines, short blurbs, and entire articles.
CGI or other server software installed at the publishers' web sites retrieve content from the authors' web sites and publish it on their own.
Readers can view the syndicated content at the publishers' web sites or use special software on their own computers to retrieve the content from the publishers. When readers are intrigued by a headline or blurb, they can click through to a regular web page at the author's web site to read the full version.
The original document at the author's web site is specially formatted so publishers' software can retrieve it.
If the author updates the original document, the changes will be effective the next time the content is retrieved, but content previously retrieved isn't automatically updated although it can be replaced with the most recently updated version.
RSS/Atom syndicated content on publishers' web sites is probably indexable by search engines. If it's published as static content, then it would be. If it's dynamic, I'm not enough of a search engine specialist to say whether or it is indexable.
2. Copy 'n Paste
Content can be syndicated by providing the HTML source code of content for webmasters (publishers) to copy and paste. http://www.aboutaerobics.com/code/aerobics-intro-code.html is an example of how it can be done.
No special software is required on publshers' servers.
Once the source code is pasted into a web page, readers can read the content just like they read other web pages.
Webmasters who publish content syndicated this way can easily change the content, whether or not authorized by the author.
If the author updates the original document, the changes will be effective the next time the content is retrieved. To update content already published, the author needs to contact each webmaster and ask them to make the necessary changes.
Content published in this way is published as static web pages and can be indexed by search engines.
3. JavaScript
Syndicating with JavaScript meets these criteria:
-
It is easy to implement by the author, easy to publish by the webmaster, and easy to read by the readers.
-
No special software is required for the author to syndicate, for webmasters to publish, or for readers to read the syndicated content.
-
It provides the ability to syndicate all of the content, or only a headline or a synopsis, whatever the author pleases.
-
Images, forms, CSS, JavaScript, and most anything else that can be published on a normal, static web page can be incorporated into syndicated content or syndicated individually.
-
It prevents publishers from changing the syndicated content without the author's consent.
-
It allows the author to change the content whenever so inclined fixing typos, updating periodical content, rotating content with the changes effective immediately and automatically, not only in the original document, but also everywhere the content is already published.
Using the same domain for an example, the web page at http://www.aboutaerobics.com/site-map.html lists several dozen aerobic and fitness articles. Each one of these exercise articles could be syndicated using the JavaScript method.
Webmaster publishers put this JavaScript into their web page where they want the syndicated content to appear:
<script
type="text/javascript"
language="JavaScript"
src="http://example.com/content.js">
</script>
The http://example.com/content.js URL between the quotation marks is replaced with the URL to the original document on the author's web site. The content at the URL is what's published.
This is how to prepare the original document:
-
Put the content into a word processor.
-
Put a backward slash character immediately in front of every single quote (apostrophe) character in the file.
-
Put the characters: ');
at the end of every line of the file.
-
Put the characters: document.writeln('
at the front of every line of the file.
-
Put this line at the top of the file:
<!--
-
Put this line at the bottom of the file:
// -->
Give the file name a .js extension and upload it to your server. The URL of the file is the value of the SRC in the JavaScript webmaster publishers put on their web pages to publish the content.
That's all there is to it.
Software exists to assist in the preparation of the original document. But such software is not required.
Master Syndicator of /a/26t/pl.pl?msyn and Master Syndication Gateway I of /a/26t/pl.pl?msg both properly prepare and save the document on the author's server, and generate the JavaScript for webmaster publishers to use.
Consider acquiring one of the above for the other features the software provides. As this article is being written, both of those software titles are being upgraded to remove some current restrictions and to add more features.
4. JavaScript and CGI
If my understanding is correct, search engines don't currently index content published with JavaScript. If this is important, webmasters can publish the content into indexable static web pages with the following method:
The page where the content will be published must be an SSI page. Usually, that would mean a file name with a .shtml extension. Check with your hosting company to verify this is the extension for you to use.
Step 1.
This perl CGI program must be installed on each webmaster publisher's server:
#!/usr/bin/perl
use strict;
use LWP::Simple;
my $Page = get 'http://example.com/content.js';
$Page =~ s/^\s*<!--//s;
$Page =~ s/-->\s*$//s;
$Page =~ s/\/\/\s*$//s;
$Page =~ s/[\'\"]\)\;\s*$//gm;
$Page =~ s/^\s*document\.write(?:ln)?\([\'\"]//gm;
$Page =~ s/\' \+ \'//g;
$Page =~ s/\\\'/\'/g;
$Page =~ s/\\\"/\"/g;
$Page =~ s/\\\\/\\/g;
print "Content-type: text/html\n\n$Page\n";
# end of script
Replace the http://example.com/content.js URL between the single quotation marks in the above script with the URL in the SRC of the JavaScript that would otherwise be used to syndicate the content.
All editing should be done with a plain text word processor like NotePad or BBEdit.
Name the script file content.cgi or whatever makes sense to you. Upload it with an FTP program as a plain text file (not as a binary file). Then give the file 755 permissions.
To test, type the URL of the script (like http://example.com/cgi-bin/content.cgi). If text displays in your browser, the installation is okay. If not, see the Q&A at /support/faq/
Step 2.
Put an SSI tag in the web page where you want the content published. Example:
<!--#exec cgi="/cgi-bin/content.cgi"-->
The URL between the quotation marks needs to be the relative URL to the script in step 1. (Absolute http://... URLs don't work in SSI tags.)
Test the web page by typing its URL into your browser.
If you see the content, you're good to go.
If you see nothing where the content should be, not even an error message, something is wrong with the script in step 1.
If you see the "[an error occurred while processing this directive]" message, the server doesn't recognize the SSI tag or the relative URL is incorrect.
First, verify the relative URL is correct.
If it is correct, try this SSI tag instead (again verifying the relative URL is correct):
<!--#include virtual="/cgi-bin/content.cgi"-->
Test the web page like you did before.
If you see the content now, you're good to go.
But, if you still see the "[an error occurred while processing this directive]" message instead of the syndicated content, then your hosting company doesn't support the SSI that you need.
Conclusion
If you wish to syndicate electronic content, one of the above methods will probably work for you. If they don't, email me and I'll see if I can work out something that will meet your requirements.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2004 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.