Commit f8e91f27 by nadeem.qasmi

location new js code

parent 3647faf1
Pipeline #521 passed with stage
in 0 seconds
...@@ -405,19 +405,10 @@ $selected_id = isset( $_GET['course'] ) ? $_GET['course'] : - 1; ...@@ -405,19 +405,10 @@ $selected_id = isset( $_GET['course'] ) ? $_GET['course'] : - 1;
$(document).ready(function() { $(document).ready(function() {
var ips ='00'; $.getJSON('https://ipapi.co/json/', function(data) {
$('#country_code').val(data.country);
$.getJSON('https://json.geoiplookup.io/api?callback=?', function(data) {
//console.log(data.ip);
ips = data.ip;
$.getJSON("https://cors-anywhere.herokuapp.com/http://www.geoplugin.net/json.gp?ip="+ips,function(response){
$('#country_code').val(response.geoplugin_countryCode);
});
}); });
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment