Location: PHPKode > projects > ZorbIPTraffic > zorbiptraffic/zorbiptraffic/monthgraph.php
<?php 
include "zorbconf.php";
include("zorblang$lang.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= 70;  
$image = imagecreate($width, $height);  
// colors  
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);  
$black = imagecolorallocate($image, 0x00, 0x00, 0x00);  
// draw something here  
$titlefont = 3;  
$fontwidth=imagefontwidth($titlefont);
if ($num==1)  {$title=zorbtrans("January"); }
if ($num==2)  {$title=zorbtrans("February");}
if ($num==3)  {$title=zorbtrans("March");   }
if ($num==4)  {$title=zorbtrans("April");   }
if ($num==5)  {$title=zorbtrans("May");     }
if ($num==6)  {$title=zorbtrans("June");    }
if ($num==7)  {$title=zorbtrans("July");    }
if ($num==8)  {$title=zorbtrans("August");  }
if ($num==9)  {$title=zorbtrans("September");}
if ($num==10) {$title=zorbtrans("October"); }
if ($num==11) {$title=zorbtrans("November");}
if ($num==12) {$title=zorbtrans("December");}
$pos=$height-($height-$fontwidth*strlen($title))/2;
imagestringup($image, $titlefont, 3, $pos, $title , $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