<?php
$ip_from_here = json_decode(file_get_contents('https://ipinfo.io'));
$ip = $ip_from_here->ip;
$country_code = $ip_from_here->country;
echo'<img src="http://www.geognos.com/api/en/countries/flag/'.$country_code.'.png" width="18" height="12">';
?>
上面是一段根据 ip 地址生成国旗图标代码
如何在 html 中引用生成的这个国旗图标呢?
本人刚学 hmtl,求大神帮忙,感激不尽
$ip_from_here = json_decode(file_get_contents('https://ipinfo.io'));
$ip = $ip_from_here->ip;
$country_code = $ip_from_here->country;
echo'<img src="http://www.geognos.com/api/en/countries/flag/'.$country_code.'.png" width="18" height="12">';
?>
上面是一段根据 ip 地址生成国旗图标代码
如何在 html 中引用生成的这个国旗图标呢?
本人刚学 hmtl,求大神帮忙,感激不尽