I am using hostip.info API to display country flags for IP's.
What I would like to do is when a user hovers over the flag it will display the country name.
Has anyone have an idea on how to do this?

Hi, you could use the get_json.php end point to get the data array. For example:

$u = 'http://api.hostip.info/get_json.php';
$r = json_decode(file_get_contents($u));

echo $r->country_name;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.