CodeIgniter Forums
Work with IP with CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Work with IP with CI (/showthread.php?tid=5260)



Work with IP with CI - El Forum - 01-14-2008

[eluser]marche85[/eluser]
There any function to work with IP to be able to know what country a visitor comes?
Thanks


Work with IP with CI - El Forum - 01-14-2008

[eluser]Code Arachn!d[/eluser]
You can probably use a service like http://www.hostip.info to grab the data via API


Work with IP with CI - El Forum - 01-14-2008

[eluser]marche85[/eluser]
But there was any class that could use CI for managing IP without using http://www.hostip.info/


Work with IP with CI - El Forum - 01-14-2008

[eluser]Code Arachn!d[/eluser]
Well realistically what is needed is a super large database to query the IP block against the assigned ARP countries or something like that - so technically the requirements would be the database and then just use the regular db class.


Work with IP with CI - El Forum - 01-14-2008

[eluser]marche85[/eluser]
Thanks!! :-)


Work with IP with CI - El Forum - 01-14-2008

[eluser]Code Arachn!d[/eluser]
Google is your friend :coolsmile:

I have used this database in the past and it works pretty good - it's frequently updated...

http://software77.net/cgi-bin/ip-country/geo-ip.pl


Work with IP with CI - El Forum - 01-14-2008

[eluser]Huan[/eluser]
ip2nation.com provides a MySQL database and sample PHP scripts that you can intergrate with your CI program. It's free and it works well for me.


Work with IP with CI - El Forum - 01-15-2008

[eluser]Code Arachn!d[/eluser]
nice find