marksie1988 Posted May 28, 2007 Share Posted May 28, 2007 hey guys i have been searching the net with no joy. basically i want a hit counter that logs unique hits by ip address and logs it in a mysql table but only once then when the data is logged it displays the number of people who have visited i would prefer not to use cookies if possible e.g. the php could check against the table to see if that ip is there if so then dont log it?? Quote Link to comment https://forums.phpfreaks.com/topic/53261-solved-oho-hit-counter-unique-using-mysql/ Share on other sites More sharing options...
trq Posted May 28, 2007 Share Posted May 28, 2007 Were not going to write the code for you. Ide suggest you read up on mysql_query and its related functions. Also, you can get an ip through $_SERVER['REMOTE_ADDRESS']. Quote Link to comment https://forums.phpfreaks.com/topic/53261-solved-oho-hit-counter-unique-using-mysql/#findComment-263173 Share on other sites More sharing options...
marksie1988 Posted May 28, 2007 Author Share Posted May 28, 2007 ok i am creating a script myself and i dont know how to say if (ip address == ip address in table){ exit } here is what i have $mp_ip = $_SERVER[REMOTE_ADDR]; if ($mp_ip == ['ip']) { exit } i know that something needs to go before the $mp_ip but i dont know what and i cant figure it out. as its not one ive done before Quote Link to comment https://forums.phpfreaks.com/topic/53261-solved-oho-hit-counter-unique-using-mysql/#findComment-263209 Share on other sites More sharing options...
MadTechie Posted May 28, 2007 Share Posted May 28, 2007 you need to store the IP's i would also recommend MySQL, look here Simple MySQL PHP Hit Counter Quote Link to comment https://forums.phpfreaks.com/topic/53261-solved-oho-hit-counter-unique-using-mysql/#findComment-263217 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.