I installed gd but the whole thing does NOT work the way I want it to work.
If I put counter.php (the page that counts and generates the image) and the image counter.png to the same directory or domain as the page that called this page then everything works fine.
The first page has this part of code :
<SCRIPT language="Javascript">
document.write('<IMG src="http://[I]domain[/I]counters/counter.php?id=1&
ref='+escape(document.referrer)+'" border="0">');
</SCRIPT>
The seond one has this php code
...
...
$image = $ref ."counter.png";
header("Content-type: image/png");
$string = $top_num;
$im = imagecreatefrompng($image);
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
Not only this is not working when on different directories but $id and $ref are null when I try to manually load counter.php I[/I] removing header command of course
Any help????