Work with IP with CI |
[eluser]marche85[/eluser]
There any function to work with IP to be able to know what country a visitor comes? Thanks
[eluser]Code Arachn!d[/eluser]
You can probably use a service like http://www.hostip.info to grab the data via API
[eluser]marche85[/eluser]
But there was any class that could use CI for managing IP without using http://www.hostip.info/
[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.
[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
[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.
|
Welcome Guest, Not a member yet? Register Sign In |