I disagree...it depends on the frequency that you need to view the log. If you grep the log for the file name once a day, then yes, that's probably the most efficient method, but if you're going to be looking fairly frequently, I might opt for something like what the OP has where log.php increments a count somewhere and then delivers the image to the browser (or redirects the browser to the image). You're really not talking about a lot of overhead there.
but what about bandwidth? for some reason i have this idea in my head that doing this would double the bandwidth, am i totally wrong? would bandwidth be unaffected? because i cant use more bandwidth, i am already nearing my quota.
actually never mind, when i have:
/uploads/test.jpg go to /fetch.php
and fetch.php say:
a Firefox error appears saying it will redirect forever, which now that i think about it makes sense because its requesting the file that will redirect to the script that's requesting the file that's redirecting... go on and on. But is there a way around this?
Also, when i go to /fetch.php in the browser it works fine.