Ich habe mir mal eine SIg gebastelt die etwas mehr zu mir passt (also was total verrücktes und bescheuertes). Kriterien waren, dass es sich ständig verändert und eigentlich bescheuert sein soll. Den einfachsten Weg sowas in die Signatur von Foren zu kriege ist indem man ein Bild erzeugt. Und da ich eh grad serverseitig automatisch Bidler erzeuge dachte ich mir, dass fortune die andere Kriterien erfüllt ;-) ....
<?php
if (ereg("[0-9]{2,3}",$_GET['width'])){
if ($_GET['width'] == '500') {$imwidth=500;$chars=60;}
if ($_GET['width'] == '600') {$imwidth=600;$chars=84;}
if ($_GET['width'] == '700') {$imwidth=700;$chars=98;}
} else {$imwidth=700;$chars=98;}
$imheight=35;
$font = imageloadfont('projects/fonts/8x13iso.gdf');
$font2 = imageloadfont('projects/fonts/proggyclean.gdf');
$args = "-n$chars -s -o sex drugs vulgarity";
$text = shell_exec ("/usr/games/fortune $args");
$xpos = 5;
$ypos = 19;
Header("Content-type: image/Jpeg");
$im = @ImageCreate ($imwidth,$imheight) or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 58, 58, 68);
$text_color = ImageColorAllocate ($im, 240, 240, 240);
$cursor_color = ImageColorAllocate ($im, 40, 240, 40);
$border = ImageColorAllocate ($im, 0, 0, 0);
ImageString ($im, $font, $xpos, $ypos-14, "[ ]$", $cursor_color);
ImageString ($im, $font, $xpos, $ypos-14, " dopy@bahnhof:~ fortune $args", $text_color);
ImageString ($im, $font2, $xpos, $ypos, "$text", $text_color);
imagerectangle ($im, 1, 1, $imwidth-1, $imheight-1, $border);
imagerectangle ($im, 2, 2, $imwidth-2, $imheight-2, $border);
ImageJpeg($im);
ImageDestroy;
?>
Und damit man das Script schön als Bild aufrufen kann eine kleine Apache Rewrite Regel
Das Ergebnis ist, dass wenn versucht das Bild http://dopefish.de/sig_700.jpg aufzurufen wird das Script http://dopefish.de/sig.php?width=700 aufgerufen und das Ergebnis zurückgeliefert.