Jump to content
Sign in to follow this  
BrainPill

how to get a unique visitor registration in the database

Recommended Posts

I am working on a visitor counter. One way of storing the visitors in the database table is by getting the ip number. 

But I am not sure whether it is the right solution or not. I wonder if it is possible for a visitor to hide an ipnumber in a way that there is no ipnumber at all.

 

Is that possible?

 

What would you recommend to do to get a quite (real) unique visitor registration without users needing the possibilty to log in?  

Share this post


Link to post
Share on other sites

You can compare IPs, sure.

http://itman.in/en/how-to-get-client-ip-address-in-php/

Alternatively, you can use Cookies

http://php.net/manual/en/function.setcookie.php

and use $_COOKIE, to check if its there.

 

If you were looking for something like 'visits' you could use sessions.

 

Does that work for you?

Share this post


Link to post
Share on other sites

People can't hide their IP, but multiple people might use the same IP.  One person might also change their IP.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...