Hit Counter counting multiple times in one request (PHP)

biso911

New Member
I am trying to create a simple Hit Counter using Kohana3 and PHP. But when I load a page with it, it counts as 1-3 times (normally, the first hit 3, then 2, then 1).The code I'm using:\[code\]$game = ORM::factory('game') ->find_by_slug($slug);if(!$game->loaded()){ $this->request->redirect('/',404);}$game->times_played++;$game->save(); \[/code\]An example page: http://www.plugb.com/game/qrossfire EDIT: Number of times played is below description.How can I solve this?Thank you. EDIT:I've found some requests like this:\[code\]/game/qrossfireAgent: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)/game/stickmen-swatAgent: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)/game/qrossfireAgent: MetaURI API +metauri.com\[/code\]
 
Back
Top