[imp] MOTD examples

Kevin Myers km@gcom.co.th
Sat, 11 May 2002 19:58:01 +0700


On Sat, 4 May 2002 00:28:12 -0400, you wrote:

>this is a small script I wrote, you can run it either from cron or using=
 system() or some other php facility:
>more fortune.sh
>#!/bin/sh
>test=$(/usr/games/fortune -e all|sed 's/\"/\\\"/g'|sed 's/^/<BR>/')
>echo "<?php print(\"<br><br><br><br><center><font size=4 =
color=\\\"white\\\"> $test </font></center>\"); ?>" >/u
>sr/local/www/horde/config/motd.php
>cp /usr/local/www/horde/config/motd.php =
/usr/local/www/horde/imp/config/motd.php

Along the same lines, would this be a good, or a bad, thing to put in the
MOTD? :

<?php
$fortune = shell_exec("/usr/games/fortune -e all | sed 's/\"/\\\"/g' | sed
's/^/<BR>/'");
print("<br><center><font color=\"white\">$fortune</font></center>")
?>