lordfrikk Posted March 14, 2008 Share Posted March 14, 2008 Hey, this is what it should like (viewed in Internet Explorer and Firefox 3 Beta 3): And this is how it looks like (viewed in Opera 9.50 Beta): This is my signature here on forums: [img=TOP IMAGE HERE] [img=http://lordik.php5.cz/sigcnt/counter_en.gif] The script is camouflaged so the forums accept it between image tag in this way (counter_en.gif is directory in fact): http://lordik.php5.cz/sigcnt/counter_en.gif/INDEX.PHP <-- this is the script The snippet itself: <?php $filename = '../counter.dat'; if (file_exists($filename)): $count = file_get_contents($filename); file_put_contents($filename, $count + 1); else: $f = fopen($filename, 'x'); $count = 1; fputs($f, $count); fclose($f); endif; $message = sprintf('This signature has been viewed %d times ', $count); $font = 1; $width = imagefontwidth($font) * strlen($message); $height = imagefontheight($font); $im = imagecreatetruecolor($width, $height); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); imagefill($im, 0, 0, $white); imagestring($im, 1, 0, 0, $message, $black); imagecolortransparent($im, $white); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header('Content-type: image/gif'); imagegif($im); imagedestroy($im); ?> Quote Link to comment Share on other sites More sharing options...
lordfrikk Posted March 14, 2008 Author Share Posted March 14, 2008 Bump. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.