BkBlog-Fr- BkBlog-En- WlBlog-Fr- ComBlog-fr
You are in a SocioHazard Area

BrokenClock's English Blog

The only clock that gives the exact time, but only twice a day.


Post details: Use your screensaver as a basic newsreader...

2005-11-11

20:11 Use your screensaver as a basic newsreader...

Categories: My Scripts

I've done that just to read something when I feed my little baby.
I've done this under Linux, but it may work with some sreensavers with Windows.
The only requirement is that your screensaver must be able to read text file and pare it using an url only.

I use FEED ON FEEDS as web newsreader. The php script you'll find here works only with it, but it may be easily modified to work with another one. It randomly select one of the feeds I have syndicate and display it. The screensaver ask for it from time to time, so you have fresh news all the time.

[More:]

Put the following script in a text editor, modify lines 3 and 4 to suit your case,save it as a PHP file, put it on your webserver.

<?php
header("Content-type: application/xml");
$dbserver=mysql_connect("server","user","password");
$db=mysql_select_db("database",$dbserver);
$sql = "SELECT `url` FROM `px_feeds`";
$result=mysql_query($sql);
while ($feed=mysql_fetch_row($result)) {
$feeds[]=$feed[0];
}
$feed=$feeds[array_rand($feeds)];
$feedID=fopen($feed,"r");
while (!feof($feedID)) {
print fread($feedID, 8192);
}
?>

Get the url to access it, put this url as the text to use for the screensaver. Under Linux, you can do this in the Advanced tab of the screensaver settings :
The Advanced Tab of the screen saver setting (on a french computer, sorry...)
The result is pretty good using the Phosphor screensaver, but may be great with others:
The result with Phosphore
Let me know if you make this work with other screensavers (on both Linux and Windows) and how it looks like!

2 feedbacks Permalink

Comments:

Comment from: Andrew Turner [Visitor] · http://fofredux.sf.net
2006-02-01 @ 06:52
This is *very* cool. You should grab FoFRedux (http://fofredux.sf.net) and get the updates with your screensaver.

I'll have to install XScreenSaver on my mac now!
Comment from: brokenclock [Member] · http://brokenclock.free.fr
2006-03-11 @ 14:10
It also work with the "Noiseguy" linux screensaver.

Leave a comment:


Your email address will not be displayed on this site.

Your URL will be displayed.

authimage

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, a, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
URLs, email, AIM and ICQs will be converted automatically.
Options: (Line breaks become <br />)
(Set cookies for name, email & url)

:: Archives

(cc)
SOME RIGHTS RESERVED
This work is licensed under a Creative Commons License.
(cc)
CERTAINS DROITS RÉSERVÉS
Cette création est mise à disposition sous un contrat Creative Commons.
Menu
February 2010
<<  <   >  >>
10