Michael,
    IMO,  rolling your own might be a more accurate count.  I had a 
similar
problem counting hits to .pdf files.  (For some reason, some adobe 
readers
will register double hits to the same file -- this was well over a 
year ago,
so it may have changed since then).  Anyway, what I ended up doing is
basically setting a cookie on the user with the filename and date -- I
checked that with the request to the file and if the user had already
requested it that day, then don't register a hit, otherwise, register 
a hit.

Since your site has a lot of pictures, I wouldn't try to set a cookie 
for
every picture and that would be a lot of traffic going back and 
forth, so a
client or session variable might be better in that regard.

Tim P.
----- Original Message -----
From: "Michael Lugassy" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 5:09 PM
Subject: Me Vs. Counters


I'm trying to find the best way to count hits on multiple files on a
photoshare site.
Each photo (jpeg) is called using a .cfm page (to include the 
next/prev
interface and photo details) like this:

http://www.imvamp.com/photoshare/?action=browse&grid=Pokimon&phid=1787
&colid
=1&cols=3

Questions:

1. Is there a better solution then to include a 
<CFQUERY>UPDATE</CFQUERY>
in the bottom of each page to count hits?

2. Is it possible to somehow use IIS log files to intereprt hits 
better?
(we have LOG visit turned on on those resources)

3. If that's the only solution, can someone explain how can I make 
use of
the cftry/cfcatch thing on the <CFQUERY>UPDATE section so that if an 
erro
occur in the update process to the db will be down, users will still 
see the
image without a cf error.

Thanks!

Michael.
http://share.imvamp.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to