Sknyppy is correct in that you'll have to rely on some JS to accurately determine this. When a browser downloads a page, it retrieves all the images from the server and usually stores them in it's local cache. When someone does a "save as", the browser will usually just pull it from the local cache for the save-as function. Since JS may be disabled or the visitor's browser may not fully support all the JS functions required to do this, a JS solution is far from being a guarantee of counting them.
If you do want to do this, I would recommend triggering an image download when they right click and have the src attribute of the image be a CF script. This CF script can update your counter and then return a 1x1 pixel image through the CFcontent tag. This will make the browser think it loaded an image but in reality will allow you to execute code on the server when it happens. The real hard part will be figuring out how to check for a right click on an image and whether you can tell if they actually save the image or just cancel out.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.