View Single Post
  #5  
Old 06-02-2007, 03:17 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Elk View Post
there are no images in it :o also the images are png only as far as i can read
Umm... Just name your image "image.jpeg".

PHP Code:
<?php
$filename 
= "./counter";
$image = imagecreatefromjpeg( "./image.jpeg" );
$offset = array(x=> 25,y => 50);

$count = file_get_contents( $filename );
file_put_contents( $filename, ($count + 1) );

$textcolor = imagecolorallocate( $image, 0, 0, 0); // Black
imagestring( $image, 5, $offset['x'], $offset['y'], $count,  $textcolor );
header("Content-type: image/png");
imagepng( $image );

?>
I didn't check for font's themselves... But this should do. ( It works too. )

Last edited by Novo; 06-02-2007 at 03:42 PM.. Reason: JPEG Format
Reply With Quote