[PHP] Small usercounter

So there was a contest (over at #php.de on quakenet) to write a small PHP-Counter with graphical output, my contribution:


<?php
session_start();touch($f=ip2long($_SERVER[‘REMOTE_ADDR’]),$t=time(),$m=’r’);
if((@!$_SESSION[$d=’:’]&&@!$_COOKIE[$d])){setcookie($d,$_SESSION[$d]=$p=3600,$t+$p);
if(($fgets(fopen($f,$m)))<$t-$p){fputs(fopen($f,’w’),$t); touch($f*$t);}}ImageString($o=ImageCreateTrueColor(99,9),1,2,1,(count(glob(‘*’))-1),65535);
header(‘Content-Type:image/png’);ImagePNG($o);
?>

Tags: , ,

Leave a Reply

You must be logged in to post a comment.