Skip to content

Instantly share code, notes, and snippets.

@vseow vseow/index.php
Last active Sep 3, 2019

What would you like to do?
Get Country from IP with PHP
//echo $ip;
// Docs:
// Capped at 250 lookups/min - can unban yourself if you go over
$xml = simplexml_load_file("".$ip);
echo $xml->country;

This comment has been minimized.

Copy link

commented Sep 3, 2019

thank youuuuuuu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.