giarnz Posted January 20, 2007 Share Posted January 20, 2007 Hi all,I have unsuccessfully spent the majority of my week searching for a solution or apache mod to make .gif as php readable.Could someone please post the code or the mod which allows this as I have seen it being used, but can not find the code?Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/ Share on other sites More sharing options...
fert Posted January 20, 2007 Share Posted January 20, 2007 this is a chmod thing not an apache thing Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-164864 Share on other sites More sharing options...
giarnz Posted January 20, 2007 Author Share Posted January 20, 2007 Hi fert,Could you please elaborate? Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-164891 Share on other sites More sharing options...
fert Posted January 20, 2007 Share Posted January 20, 2007 you need to change permissions of the GIF so PHP can read it Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-164909 Share on other sites More sharing options...
giarnz Posted January 20, 2007 Author Share Posted January 20, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-164923 Share on other sites More sharing options...
effigy Posted January 20, 2007 Share Posted January 20, 2007 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] Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-165097 Share on other sites More sharing options...
giarnz Posted January 23, 2007 Author Share Posted January 23, 2007 Thanks effigy.Your post was very helpful. :) Quote Link to comment https://forums.phpfreaks.com/topic/34955-apache-gif-modification/#findComment-166834 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.