birbal Posted October 6, 2010 Share Posted October 6, 2010 there php can get a ip value from $_SERVER['REMOTE_ADDR']....but there is some ip that change every moments (dont know exactly why did it happen )so how can i detect these kind of ip(user) in site. is there any way to fix that?... Link to comment Share on other sites More sharing options...
Synook Posted October 6, 2010 Share Posted October 6, 2010 Use another form of identification, like cookies.As for why it happens, some ISPs just work like that. Usually it's by domain, though... Link to comment Share on other sites More sharing options...
birbal Posted October 7, 2010 Author Share Posted October 7, 2010 Use another form of identification, like cookies.As for why it happens, some ISPs just work like that. Usually it's by domain, though...1)but user may delete cookie or may disable that.2) actually i am crossechecking ip for every time user load a page to authenticate for particular session..so untill someone's session does not expire other ip cant get session . but problem is in above scenrio it will cause unwanted problems.i saw some article on net..they are taking first three tuple of the ip. but i am not getting how the first three tuple can identfiy an user. or did not getting how do they work. so any idea on it? Link to comment Share on other sites More sharing options...
wirehopper Posted October 7, 2010 Share Posted October 7, 2010 You could also use sessions.http://www.php.net/manual/en/intro.session.php Link to comment Share on other sites More sharing options...
justsomeguy Posted October 7, 2010 Share Posted October 7, 2010 i saw some article on net..they are taking first three tuple of the ip. but i am not getting how the first three tuple can identfiy an user. or did not getting how do they work. so any idea on it?The IP is broken up into 4 tuples that identify various networks which narrow down to the specific computer or connection. Just taking the first 3 and not the last one isn't a perfect solution, because 2 people who may be on the same ISP in the same area may have the first 3 tuples be the same, so you could have more than one person with the same info. Even with all 4 it's still not a good idea, because you'll have an entire company that has one public IP but several computers behind it, so even if you take the entire IP there could still be several users with that same IP. Or, like you've seen, the IP for one person can change. The point to take out of this is that you can't use the IP address to identify a person because an IP address identifies a connection, not a person. I'm not aware of any major website or application which tries to use the IP address to identify specific users. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.