Jump to content

Apache .gif Modification


giarnz

Recommended Posts

So, if I wanted to track the number of clicks on certain images (eg) www.sitename.com/123.gif, instead of using web server logs such as AWSTATS, etc. what would I need to do to use a traditional tracking application, and make 123.gif php readable? This way I can track the clicks as a .php file, even though it is a .gif image?


Thanks.
Only allow the gif to be accessed through a gallery. For the record, you can also do something like what's below, but I think more headers are needed in order to be cleaner.

[code]
<?php
// Do stuff.
$gif = 'tmp.gif';
header('Content-Type: image/gif');
header('Content-Length: ' . filesize($gif));
readfile($gif);
?>

[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.