First and foremost, please forgive me if this is in the wrong section. I always seem to pick the wrong site when it comes to computer questions.
In the air of recent, wildly viral internet events, my buddy and I have formulated an idea to run an experiment to see how the phenomenon works. However, I am unsure of how the back-end would work.
We would host a single image file (.jpg/.png/.gif) on our server. The image is not intended to be hosted on a single web page - it is assumed this image will be cross posted, shared, etc. The fact that the image file itself is hosted on our server will remain constant (we're not taking into account situations where the image is saved/archived and hosted elsewhere, and then viewed).
We would like to be able to view a log of hits that the image gets, along with the IPs of viewing PCs (to figure out the progressive geographical spread of the image).
First, is this possible? I have seen many images that say 'your IP is blah blah blah, using Safari...', and I have also seen many instances where an image will "know" when its being hosted on a site other than its home (to prevent hotlinking).
Second, how would this be accomplished? Can an analytics program track such specific hits on a simple image file?
Just configure a web server, put the image onto it and configure the logging to what you want to log. I guess that Apache's default log configuration should be sufficient.
You can that feed that log into any analysis program you want.
You've asked a few questions, so I'll separate the answers
Log monitoring
You can simply watch the
access.log
(assuming Apache) to see an overview of source IP and hits to the file you want. But this isn't going to give you any useful/tangible information - certainly since you are asking what analytics packages could be used to achieve this.There are a few free applications available to do what you want, albeit with more complexity (and functionality than you probably require). They work at the server level by parsing the access logs. Two good examples are:
Dynamic Images
If you want an image to contain dynamically generated information, like source IP, number of hits, date/time ... the list is endless; you'll need to use a programming language of sorts.
Depending on what platform you are using for your web server, different options are available to you. For example with PHP, you can use the Image GD library
Then you could not only serve dynamic images, but also track hits via MySQL to produce whatever output you like.
Contrary to the opinion of others, this is actually the most straightforward way to track and generate a dynamically generated image. The Server Fault
flair
badges are a good example of this.You could then combine your data from this with the PECL GeoIP extension and plot your geographical map as you so desire.