How to Setup Coranto so Other Websites Can Display Your Headlines

If you want to use Coranto to allow other web sites to display your headlines... here is how I did it:

I downloaded and installed the addon "RSS File Advanced" which summarizes Coranto news items in RSS format 0.91 for automatic export and headlines in RSS viewers or parsers. For those who are technically savvy they could probably set up their own script to parse your XML feed but many average website owners would be lost as to how to do this.

I downloaded and installed "RSS Fetcher" from http://www.mimanet.com/scripts/rss_fetcher.html

This script will fetch RSS files from a remote site, format them as Javascript include and store the HTML in a file on your site. You can use this to display headlines from other sites. I use it to fetch my XML generated by "RSS File Advanced" and what it does is... it places the headlines in a nice javascript file. So if you want to offer someone with limited abilities to show your head lines you can give them a line they can copy and paste such as:
(SCRIPT LANGUAGE="JavaScript1.1" SRC='http://yourdomain.com/xml/yourfile.js')(/SCRIPT)

Yes, I am aware that there are people who turn Javascript off, so there may be the odd person who doesn't see your headlines on someone elses site, but it does make it easy for less experienced webmaster who wants to display your headlines.

Then after every session where I've used Coranto to "submit news" I run the "rss.pl" from the cgi-bin which updates "yourfile.js"

The "RSS File Advanced" automatically creates anchor tags linking to the right posting/story which are displayed on a page I titled "news.shtml" These links work in the Javascript include as well, so that when someone clicks on a particular headline they are taken to the right story on "news.shtml"

There were a couple of problems with the "RSS Fetcher" script. The first problem is the file calls an .rdf file from mimaent.com which doesn't exsits and creates a bit of an error. I suppose the primary intention of this is so that you would display their headlines as well. You have to remove this. Actually, I edited both line #66 and #67 so that the only news being fetched right now is the XML file created by "RSS File Advanced."

Then on line #207 in "RSS Fetcher" there is a call to a redirect script on the mimaent.com website which is instrumental for having your links in the Javascript file work. I didn't want to depend on the availability of their web site in order for my links to work. Here is the line of code on #207:

$url = "http://www.mimanet.com/cgi-bin/jump.cgi?to=" . &urlencode($url);

So I wrote my own "jump.cgi" to run off my server:

*********************

#!/usr/bin/perl

# Since we used the GET method, the data is stored in
# $QUERY_STRING.

# Let's copy the contents of the $QUERY_STRING variable
# to another variable so that we can work with it.

$form_data = $ENV{'QUERY_STRING'};

$form_data = $ENV{'QUERY_STRING'};
$form_data =~ s/\+/ /g;
$form_data =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;

($label, $target_URL) = split (/=/, $form_data);

print "Location: $target_URL", "\n\n";

*********************

... so now line #207 looks like this:

$url = "http://www.homebusiness-websites.com/cgi-bin/jump.cgi?jumpTo=" . &urlencode($url);

I will probably watch the referring URL's that call this script to see what other sites are displaying my headlines ... when I get around to offering this to my site visitors.

Well... that's how I did it. Hope this helps you.

If you want to include these headlines on your site just copy and paste the code below into your web page where you want them to appear and then change the brackets into HTML angle brackets.

(SCRIPT LANGUAGE="JavaScript1.1" SRC='http://homebusiness-websites.com/xml/homebusiness.js')(/SCRIPT)

| Back to Article Index |

Copyright © All Rights Reserved. The information/images on this website
may not be reproduced or republished by anyone without permission.