1 May
This is a re-published (& slightly updated) article, orginaly published on my first blog The Journal (now offline, redirecting here)
*cue Tim Shaw voice-over* “Have you ever wanted to have the latest news on the persecution of Christians around the world on your website? Well now you can!“
ahem…
I’ve written a perl script to extract the RSS file from the Voice of the Martyrs website.
This takes the rss file and parses it using the XML::RSS module. So obviously you will need to be running a server that has both perl and the XML module installed. By default the script creates a div that looks like this (using the default css file), but it can be edited to change the HTML produced.
Anyway, here’s the code:
<?php require($CODE_INCLUDE_PATH."vomheadlines.txt"); ?>
or download the files [vomheadlines.pl] [vomheadlines.css]
When the script is run, it creates a file in the location specified by the $outputFile variable. If you put this into your includes directory and include it in your web pages, the headlines will appear. To make them regularly update, make a cron job for it. Once a day should be regularly enough.
Instructions:
$outputFile to wherever you keep your include files (or make a directory for it if you don’t have one)0 0 * * * /path/to/vomheadlines.pl)
5 Responses for "Put the Voice of the Martyrs headlines on your site"
Glenn,
This file no longer exists. Last month we had 1600 requests for this(http://www.persecution.com.au/images/nl/default.xml). FYI
Glenn,
This file no longer exists. Last month we had 1600 requests for this(http://www.persecution.com.au/images/nl/default.xml). FYI
Sorry. my bad, I changed that ages ago into the 2 RSS files that are now on the site, but I never updated the url on this post.
Fixed now
Sorry. my bad, I changed that ages ago into the 2 RSS files that are now on the site, but I never updated the url on this post.
Fixed now
To cut one’s throat with a feather. Howell.
Leave a reply