- Code: Select all
<?php
Header("Content-type:image/gif");
$fp = fopen("timer.txt","r");
$str1 = fgets($fp,10)+0;
$str1++;
fclose($fp);
$fp = fopen("timer.txt","w");
fputs($fp,$str1);
fclose($fp);
$len1 = strlen($str1);
$str2 = "000000000";
$len2 = strlen($str2);
$dif = $len2-$len1;
$rest = substr($str2,0,$dif);
$string = $rest.$str1;
$font = 4;
$im = imagecreate(120,31);
$background_color = ImageColorAllocate($im,0,0,0);
$foreground_color = ImageColorAllocate($im,250,250,250);
imagefill($im,0,0,$background_color);
$px = (imagesx($im)-8.3*strlen($string))/2;
Imagestring($im,3,$px,2,"My Counter",$foreground_color);
imageline($im,1,14,85,14,$foreground_color);
ImageString($im,$font,$px,15.5.$string,$foreground_color);
Imagepng($im);
ImageDestory($im);
echo(" You ara my $string Visiter");
?>
Warning: Cannot modify header information - headers already sent by (output started at D:\PHP\mytest\login.php:4) in D:\PHP\mytest\login.php on line 24 "Header......"
Warning: Wrong parameter count for imagestring()
muss ich GD install??? ich bin anfänger,wie kann ich das machen? (XAMPP2.3)