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 Quote 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... Quote 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. ;( Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/156133-web-stats-countert/#findComment-822510 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.