Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* GeoIP functionality for PHP project */
- $ip=$_SERVER["REMOTE_ADDR"];
- include("geoip.inc");
- $gi0 = geoip_open("GeoIP.dat",GEOIP_STANDARD);
- $country_code = geoip_country_code_by_addr($gi0, $ip );
- echo $country_code;
- geoip_close($gi0);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement