CodeIgniter Forums
input->ip_address() not returning full ip address - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: input->ip_address() not returning full ip address (/showthread.php?tid=28812)



input->ip_address() not returning full ip address - El Forum - 03-22-2010

[eluser]jeffpeck[/eluser]
If my ip address is "10.99.100.1, 123.123.123.123", CodeIgniter's Input->ip_address() function will actually parse this down to "123.123.123.123"

What this means is if there are 100 users all sharing one IP address because they using the same internet connection (i.e. on a router), they have no identity from one-another in situations of gathering statistics and other applications.

Is there a reason that CI purposely does this? Is this discussed somewhere on this forum?

Thanks.


input->ip_address() not returning full ip address - El Forum - 03-22-2010

[eluser]n0xie[/eluser]
[quote author="jeffpeck" date="1269295733"]
What this means is if there are 100 users all sharing one IP address because they using the same internet connection (i.e. on a router),[/quote]
You just answered your own question.


input->ip_address() not returning full ip address - El Forum - 03-22-2010

[eluser]jeffpeck[/eluser]
That is a disadvantage. It is better to know that

“10.99.100.1, 123.123.123.123”

is different from

“10.99.100.2, 123.123.123.123”

rather than view both as the same user.