General Community > Scripting Help
Click counter on HTML Image?
Colin:
Yes, that is going to require some PHP if you want to filter out bots and some you won't be able to.
OzzyMozzy:
I have now tried a couple that replace my image link with their own URL to count which is fine but they don’t filter bots.
Isn’t there any programs out there that is simple and easy to use that will do the job?
MrPhil:
If you want guests' clicks to count too, and not just logged-in members, you're going to have to look at the user agent ($_SERVER['HTTP_USER_AGENT']) and weed out anything that sounds like a bot or not a known browser. This could be after the click, or simply displaying an image instead of a link. Keep in mind that it's not foolproof, as some bots pretend to be well-known browsers (to prevent just this sort of action). If you want to ignore guests (as well as bots), you could add code to only display the link for members.
Navigation
[0] Message Index
[*] Previous page
Go to full version