jerry89 Posted April 29, 2009 Share Posted April 29, 2009 Hi , I'm wondering if anyone knows about stat counter , that can be installed on back end of website, with MySql. or anyway that would monitor the hits and where is from. I know I can use the stat coutner website. I like to have it on the webiste Thanks a lot Link to comment https://forums.phpfreaks.com/topic/156133-web-stats-countert/ Share on other sites More sharing options...
jackpf Posted April 29, 2009 Share Posted April 29, 2009 Why not just make your own? Each visit, log user's IP, increment stat count. Also, you might want to set a cookie that expires in five minutes, and if that cookie exists, don't update, to avoid people holding down f5 and stuff... Link to comment https://forums.phpfreaks.com/topic/156133-web-stats-countert/#findComment-821899 Share on other sites More sharing options...
jerry89 Posted April 30, 2009 Author Share Posted April 30, 2009 my php knowlegne isnt on that lvl to make stat counter. ;( Link to comment https://forums.phpfreaks.com/topic/156133-web-stats-countert/#findComment-822497 Share on other sites More sharing options...
jackpf Posted April 30, 2009 Share Posted April 30, 2009 if(!isset($_COOKIE['stats'])) { mysql_query("UPDATE yourtable SET stats=stats+1"); setcookie('stats', 'blah', time() + 300, '/', 'yourdomain.co.uk'); } Simple as that really. Link to comment https://forums.phpfreaks.com/topic/156133-web-stats-countert/#findComment-822510 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.