<?php
header("Content-Type: image/png");
$image= imagecreatetruecolor(62, 25);
for ($i=1;$i<78;$i+=1){
for ($j=1;$j<25;$j+=1){
$bb=ImageColorAllocate($image, 255, 255,255);
imagesetpixel($image, $i, $j, $bb);
imagesetpixel($image, $i+2, $j, $bb);
imagesetpixel($image, $i, $j+2, $bb);
imagesetpixel($image, $i+2, $j+2, $bb);
imagesetpixel($image, $i-2, $j, $bb);
imagesetpixel($image, $i, $j-2, $bb);
imagesetpixel($image, $i-2, $j-2, $bb);
imagesetpixel($image, $i+2, $j-2, $bb);
imagesetpixel($image, $i-2, $j+2, $bb);
}
}
//$bb2=ImageColorAllocate($image, 204,215,240);
$d = getdate(time());
function ImageStringWrap($image, $font, $x, $y, $text, $color, $maxwidth)
{
$fontwidth = ImageFontWidth($font);
$fontheight = ImageFontHeight($font);
if ($maxwidth != NULL) {
$maxcharsperline = floor($maxwidth / $fontwidth);
$text = wordwrap($text, $maxcharsperline, "\n", 1);
}
$lines = explode("\n", $text);
while (list($numl, $line) = each($lines)) {
ImageString($image, $font, $x, $y, $line, $color);
$y += $fontheight;
}
}
$text_color = imagecolorallocate ($image, 255, 255, 250);
$text_color2= imagecolorallocate ($image, 0, 0,0);
$text_color3 = imagecolorallocate ($image, 255, 0, 0);
//ImageString ($image, 2, 2, 1, "$REMOTE_ADDR",$text_color2);
//ImageString ($image, 1, 2, 2, "_____________",$text_color2);
//ImageStringWrap ($image, 1, 2, 13, "$HTTP_USER_AGENT",$text_color2,75);
//ImageString ($image, 1, 2, 20, " $file_lines[0];",$text_color2);
//ImageString ($image, 1, 2, 12, "$HTTP_USER_AGENT",$text_color2);
//ImageString ($image, 1, 33, 21, "+".$cd,$text_color2);
ImageString ($image, 2, 1, 1, $d["mday"].".".$d["mon"].":".$d["year"],$text_color3);
ImageString ($image, 2, 15, 12, "[".$d["yday"]."]",$text_color3);
imagepng($image);
imagedestroy($image);
$currday=$d["wday"];
?>