Location: PHPKode > projects > ZorbIPTraffic > zorbiptraffic/zorbiptraffic/numgraph.php
<?php 
include "zorbconf.php";
$get=$_GET;
$getkeys=array_keys($get);
$getcount=count($get) -1;
while($getcount>=0) 
 {
     $key=$getkeys[$getcount];
     $variable=$get[$key];
     $$key=$variable;
     $getcount=$getcount-1;
 }
$width = 20;  
$height=36;  
$image = imagecreate($width, $height);  
// colors  
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);  
$black = imagecolorallocate($image, 0x00, 0x00, 0x00);  
// draw something here  
$titlefont = 3;  
if ($num<10) $num="0".$num;
if (strlen($num)==2) $pos=24;
if (strlen($num)==4) $pos=31;
imagestringup($image, $titlefont, 3, $pos, $num , $black);      
imagerectangle($image, 0, 0,  19 ,$height-1, $black);    
// flush image  
header("Content-type: image/png"); // or "Content-type: image/png"  
imagepng($image); // or imagepng($image)  
imagedestroy($image);  
?> 
Return current item: ZorbIPTraffic