?top?left> // where is image filename; // top = y coordinates of where to start sewing // left = x coordinates of where to start sewing // Defaults will be applied if none is supplied // PHP Notes : Requires GD library 1.3 or earlier (for GIF support). include( "../scripts/dbsql.inc" ); include( "../scripts/error.inc" ); Header("Content-type: image/gif"); // set return content type // check supplied values to counter call, if none apply defaults $db = new DBSQL; $qry = "select counter from website "; $qry .= "where sitename = 'www.aquatics.com.my'"; $db->query($qry); $rc = $db->num_rows(); if ($rc == 1) { $db->next_record(); $pc = $db->getfield("counter"); $pc = $pc + 1; $qry = "update website set counter = counter + 1 "; $qry .= "where sitename = 'www.aquatics.com.my'"; $db->query($qry); $urc = $db->num_affected_rows(); if ($urc != 1) { $db->close(); exit; } // endif update failed } // endif page found $imd = ImageCreateFromGif("counter/digits/0.gif"); $dheight = ImageSY($imd); $dwidth = ImageSX($imd); $ndigits = strlen($pc); $imwidth = $ndigits * $dwidth; $imb = ImageCreate($imwidth,$dheight); for ($i=$ndigits-1,$j=0; $i>=0; $i--,$j++) { //$xpos = (($j+1) * 9) + $x; $xpos = $imwidth - (($j+1) * $dwidth); $ifn = "counter/digits/".substr($pc,$i,1).".gif"; $dimage = ImageCreateFromGif($ifn); if ($dimage == "") { exit; } ImageCopyResized($imb,$dimage,$xpos,0,0,0, $dwidth,$dheight,$dwidth,$dheight); } // endfor i ImageGif( $imb ); // return the constructed GIF ?>