Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js " type="text/javascript"></script>
<script src="https://net-raft.com/plugins/jquery/get_flag/GetFlag.js" type="text/javascript"></script>
</head>
<body>
<div class="myflag1"></div>
<?php
$details = json_decode(file_get_contents('https://geoip-db.com/json/'));
$country = $details->country_name;
echo '<script type="text/javascript">$(document).ready(function (){var country = "' . $country . '";
var height = "70";
var width = "100";
$(".myflag1").GetFlag(country, height, width);
});</script>';
?>
</body>
</html>
The most helpful PHP solutions
detect browser phpPHP Click to see more ... 4.6K 408