Sitemde her bir reklam için, ben (bu siteye benzer) vardır görüşlerin sayısını gösteren bir kutu istiyorum.
Nasıl sayfa sayısı bir reklam var hit yakalamak istiyorsunuz? PHP bunu yapan bir işlevi var mı?
Peki, hiç bu sihirli yapar hiçbir işlevi var: Eğer biraz iş yapmak zorundayız - o kadar da zor olsa ;-)
Eğer saymak olası iki şey vardır.
For the first one, number of times an ad is displayed, the basic idea is :
update ad_counters set counter = counter + 1 where ad_id = 123 gibi görünecek123 elbette reklam tanımlayıcı, yerini
For the second one, number of times an ad is clicked, the basic idea is generally :
http://yoursite.com/ad.php?id=123 gibi görünecekupdate ad_clicks_counter set counter = counter + 1 where ad_id = 123Aslında, bu SO yapmış tam olarak ne olduğunu:
http://ads.stackoverflow.com/a.aspx?Task=Click&ZoneID=4&CampaignID=785&AdvertiserID=161&BannerID=1123&SiteID=1&RandomNumber=384213225&Keywords=php%2ccounter%2cx-user-highrep%2cx-user-registered gibi bir bağlantı vardırhttp://www.xpolog.com/home/solutions/landing.jsp gibi olabilir reklamın gerçek sayfasına yönlendirilirsiniz
Of course, those two counters can be in the same table -- or even in the table in which you have the list of all ads :-)