Hello there, I am designing a website where people can come and advertise but, though i am good in PHP scripting but i do not know how to design script that can count how many times an advert is click in order to know how that charge the advert can somone pls explain better still show my the syntax regards adsegzy
The best way is for each click to route through a click counting page. Basically when someone clicks an ad it should go to clickcount.php?adid={whatever your ad ID is}. In the clickcount.php a php script should be created that reads the Ad's Id and compares it to your current ads (which I am assuming you are using a MySQL database to keep track of) and ads an additional count via the mysql and then forwards the user to the right page. I am not the best at explaining it lol. Also you can use this method to check if the user has clicked this ad in the last hour, 2 hours, 6 hours, 24 hours etc. Doing this will allow you to monitor for fraud clicks. If you want help I can explain more on how I do it for my ad network in a little more detail.