CodeIgniter Forums
Unique ID problem - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: Unique ID problem (/showthread.php?tid=65393)

Unique ID problem - Chandini - 06-07-2016

Query :
3 different users accessed internet With Same IP Address.
In PHP I given One href Link when ever User click that Link. I get the IP Address of the User .. Now How to find/Get the User Any Unique Id.
whenever Click the Href Link. i am geting same ip address(because All 3 Users Connected With same IP ). I want Which User Click That Link .. That user Information I want ...please Give any refernce links or Idea ..
Here : Without Using Cookies

RE: Unique ID problem - skunkbad - 06-07-2016

There is no way to identify a site visitor without using sessions/cookies. As you are aware, IP address can be used by more than one person. Nothing else about the HTTP request, user agent, etc. would allow you to identify the site visitor. That's why all authentication systems use sessions/cookies.

RE: Unique ID problem - cartalot - 06-07-2016

create a long randomized 'token' . pass it in a hidden form field. or add it to your links. and yes ip address is basically meaningless - it can be easily spoofed, and for some users is 'reset' every few minutes by their network provider.

RE: Unique ID problem - Josh Davidson - 06-07-2016

I think you can use Session ID. or try to read this
Hope you will get this.

RE: Unique ID problem - Aloghli - 06-07-2016

PHP Code:
function id($suffx ''$length 10) {
// return uniqid($suffx);
$characters '0123456789';
$randomString '';
        for (
$i 0$i $length$i++) {
$randomString .= $charactersrand(0strlen($characters) - 1) ];
$suffx $randomString;

PHP Code: