Usage: use this file in an image tag like: You can also give it various arguments: d: The date that can be interpreted by PHP's strtotime(). (default birthdate of the author) e: The extra text on the third line. (defaul copyright notice) f: The font size (style). (default 10) v: The font. (Default none (It will use the gd fonts and the size detirmines which one)). n: can be either: (default 0) 0: Centered 1: Left aligned 2: Right aligned. o: The border size (default 2) r, g and b: specify the foreground coler in RGB format. i, j and k: specify the background coler in RGB format. l: The language ... currently available: en, nl, de, sp, fr, it, pt. Another more elaborate example: */ function tisget($var){return(isset($_GET[$var])&&$_GET[$var]!='')?true:false;} function d($dt1,$dt2){$date1=(strtotime($dt1)!=-1&&strtotime($dt1)!=false)?strtotime($dt1):$dt1;$date2=(strtotime($dt2)!=-1&&strtotime($dt2)!=false)?strtotime($dt2):$dt2;$dtDiff=$date1-$date2;$totalDays=intval($dtDiff/(24*60*60));$totalSecs=$dtDiff-($totalDays*24*60*60);$dif['h']=$h=intval($totalSecs/(60*60));$dif['m']=$m=intval(($totalSecs-($h*60*60))/60);$dif['s']=$totalSecs-($h*60*60)-($m*60);$dif['y']=$y=intval($totalDays/365.25);$dif['M']=$M=intval(($totalDays-(($y*365.25)))/(365.25/12));$dif['w']=$w=intval(($totalDays-($y*365.25)-($M*(365.25/12)))/7);$dif['d']=round($totalDays-($y*365.25)-($w*7)-($M*(365.25/12)));return $dif;} $d=(tisget('d')&&@strtotime($_GET['d'])!=-1)?$_GET['d']:'March 25 1982 01:00:00';$e=(tisget('e')&&trim($_GET['e'])!='')?$_GET['e']:'(C)opyright 2006 Mark Sanders (aka: CyaNox)';$f=(tisget('f'))?intval($_GET['f']):0;$v=(tisget('v')?preg_replace('/[^a-z0-9_.-]/i', '', $_GET['v']):false);$v=($v!==false?(file_exists($v)?realpath($v):false):false); $n=(tisget('n'))?intval($_GET['n']):0;$o=(tisget('o'))?intval($_GET['o']):2;$r=(tisget('r')&&intval($_GET['r'])<256&&intval($_GET['r'])>=0)?intval($_GET['r']):0;$g=(tisget('g')&&intval($_GET['g'])<256&&intval($_GET['g'])>=0)?intval($_GET['g']):0;$b=(tisget('b')&&intval($_GET['b'])<256&&intval($_GET['b'])>=0)?intval($_GET['b']):0; $i=(tisget('i')&&intval($_GET['i'])<256&&intval($_GET['i'])>=0)?intval($_GET['i']):255;$j=(tisget('j')&&intval($_GET['j'])<256&&intval($_GET['j'])>=0)?intval($_GET['j']):255;$k=(tisget('k')&&intval($_GET['k'])<256&&intval($_GET['k'])>=0)?intval($_GET['k']):255;$w=(tisget('l'))?$_GET['l']:'en';if (strtotime($d) > time())$a = d($d, time());else $a = d(time(), $d); switch ($w){case 'en':default:$t=$a['y'].' Years '.$a['M'].' Months '.$a['w'].' Weeks '.$a['d'].' Days';$y=$a['h'].' Hours '.$a['m'].' Minutes '.$a['s'].' Seconds';break; case 'nl':$t=$a['y'].' Jaren '.$a['M'].' Maanden '.$a['w'].' Weken '.$a['d'].' Dagen';$y=$a['h'].' Uren '.$a['m'].' Minuten '.$a['s'].' Seconden';break; case 'de':$t=$a['y'].' Jahre '.$a['M'].' Monate '.$a['w'].' Wochen '.$a['d'].' Tage';$y=$a['h'].' Stunden '.$a['m'].' Minuten '.$a['s'].' Sekunden';break; case 'sp':$t=$a['y'].' Años '.$a['M'].' Meses '.$a['w'].' Semanas '.$a['d'].' Días';$y=$a['h'].' Horas '.$a['m'].' Minutos '.$a['s'].' Segundos';break; case 'fr':$t=$a['y'].' Années '.$a['M'].' Mois '.$a['w'].' Semaines '.$a['d'].' Jours';$y=$a['h'].' Heures '.$a['m'].' Minutes '.$a['s'].' Secondes';break; case 'it':$t=$a['y'].' Anni '.$a['M'].' Mesi '.$a['w'].' Settimane '.$a['d'].' Giorni';$y=$a['h'].' Ore '.$a['m'].' Resoconto '.$a['s'].' Secondi';break; case 'pt':$t=$a['y'].' Anos '.$a['M'].' Meses '.$a['w'].' Semanas '.$a['d'].' Dias';$y=$a['h'].' Horas '.$a['m'].' Minutos '.$a['s'].' Segundos';break; case 'sw':$t=$a['y'].' År '.$a['M'].' Månader '.$a['w'].' Veckor '.$a['d'].' Dagar';$y=$a['h'].' Timmar '.$a['m'].' Minuter '.$a['s'].' Sekunder';break; case 'fi':$t=$a['y'].' Vuotta '.$a['M'].' Kuukautta '.$a['w'].' Viikkoa '.$a['d'].' Päivää';$y=$a['h'].' Tuntia '.$a['m'].' Minuuttia '.$a['s'].' Sekuntia';break;} if($v === false){$c=imagefontheight($f);$h=imagefontwidth($f);$m=max(strlen($e),strlen($t),strlen($y));$l=imagecreatetruecolor($m*$h+(2*$o),$c*3+(2*$o));$x=imagecolorallocate($l,$i,$j,$k);$z=imagecolorallocate($l,$r,$g,$b);imagefill($l,0,0,$x); switch ($n){case 1:imagestring($l,$f,$o,$o,$t,$z);imagestring($l,$f,$o,$c+$o,$y,$z);imagestring($l,$f,$o,$c*2+$o,$e,$z);break; case 2:imagestring($l,$f,$o+(($m-strlen($t))*$h),$o,$t,$z);imagestring($l,$f,$o+(($m-strlen($y))*$h),$c+$o,$y,$z);imagestring($l,$f,$o+(($m-strlen($e))*$h),$c*2+$o,$e,$z);break; case 0:default:imagestring($l,$f,$o+(($m-strlen($t))*$h/2),$o,$t,$z);imagestring($l,$f,$o+(($m-strlen($y))*$h/2),$c+$o,$y,$z);imagestring($l,$f,$o+(($m-strlen($e))*$h/2),$c*2+$o,$e,$z);break;}}else{ $c=imagettfbbox($f,0,$v,$t);$t1=max($c[0],$c[2])+abs(min($c[0],$c[2]));$y1=max($c[3],$c[5])+abs(min($c[3],$c[5])); $c=imagettfbbox($f,0,$v,$y);$p=abs($c[7]);$t2=max($c[0],$c[2])+abs(min($c[0],$c[2]));$y2=max($c[3],$c[5])+abs(min($c[3],$c[5])); $c=imagettfbbox($f,0,$v,$e);$t3=max($c[0],$c[2])+abs(min($c[0],$c[2]));$y3=max($c[3],$c[5])+abs(min($c[3],$c[5]));$c=max($t1,$t2,$t3);$h=max($y1,$y2,$y3); $l=imagecreatetruecolor($c+(2*$o),(3*$h)+(2*$o));$x=imagecolorallocate($l,$i,$j,$k);$z=imagecolorallocate($l,$r,$g,$b);imagefill($l,0,0,$x); switch ($n){case 1:imagettftext($l,$f,0,$o,$p+$o,$z,$v,$t);imagettftext($l,$f,0,$o,$p+$h+$o,$z,$v,$y);imagettftext($l,$f,0,$o,$p+$h*2+$o,$z,$v,$e);break; case 2:imagettftext($l,$f,0,$o+($c-$t1),$p+$o,$z,$v,$t);imagettftext($l,$f,0,$o+($c-$t2),$p+$h+$o,$z,$v,$y);imagettftext($l,$f,0,$o+($c-$t3),$p+$h*2+$o,$z,$v,$e);break; case 0:default:imagettftext($l,$f,0,$o+($c-$t1)/2,$p+$o,$z,$v,$t);imagettftext($l,$f,0,$o+($c-$t2)/2,$p+$h+$o,$z,$v,$y);imagettftext($l,$f,0,$o+($c-$t3)/2,$p+$h*2+$o,$z,$v,$e);break;}} header('Content-Type: image/png');imagepng($l);?>