Created
September 25, 2013 05:44
-
-
Save PyramisDev/6695563 to your computer and use it in GitHub Desktop.
Country name and flag in php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get Country | |
----------- | |
<?php | |
$country = file_get_contents('http://api.hostip.info/country.php?ip='.$_SERVER['REMOTE_ADDR']); | |
echo $country; //Remove this line | |
?> | |
Get Flag | |
-------- | |
<IMG SRC="http://api.hostip.info/flag.php" width="30" height="20" BORDER="0" ALT="Your Choice"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment