Commit 517ed9ad by nadeem.qasmi

download all location fixed https

parent 44df86c8
Pipeline #496 passed with stage
in 0 seconds
...@@ -397,69 +397,23 @@ $selected_id = isset( $_GET['course'] ) ? $_GET['course'] : - 1; ...@@ -397,69 +397,23 @@ $selected_id = isset( $_GET['course'] ) ? $_GET['course'] : - 1;
</select> </select>
</div> </div>
<?php
// function get_client_ip() {
// $ipaddress = '';
// if (isset($_SERVER['HTTP_CLIENT_IP']))
// $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
// else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
// $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
// else if(isset($_SERVER['HTTP_X_FORWARDED']))
// $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
// else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
// $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
// else if(isset($_SERVER['HTTP_FORWARDED']))
// $ipaddress = $_SERVER['HTTP_FORWARDED'];
// else if(isset($_SERVER['REMOTE_ADDR']))
// $ipaddress = $_SERVER['REMOTE_ADDR'];
// else
// $ipaddress = 'UNKNOWN';
// return $ipaddress;
// }
// function get_client_ip() {
// $ipaddress = '';
// if (getenv('HTTP_CLIENT_IP'))
// $ipaddress = getenv('HTTP_CLIENT_IP');
// else if(getenv('HTTP_X_FORWARDED_FOR'))
// $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
// else if(getenv('HTTP_X_FORWARDED'))
// $ipaddress = getenv('HTTP_X_FORWARDED');
// else if(getenv('HTTP_FORWARDED_FOR'))
// $ipaddress = getenv('HTTP_FORWARDED_FOR');
// else if(getenv('HTTP_FORWARDED'))
// $ipaddress = getenv('HTTP_FORWARDED');
// else if(getenv('REMOTE_ADDR'))
// $ipaddress = getenv('REMOTE_ADDR');
// else
// $ipaddress = 'UNKNOWN';
// return $ipaddress;
// }
// $ip = get_client_ip();
// var_dump($ip);
?>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var ips ='00'; var ips ='00';
$.getJSON('https://gd.geobytes.com/GetCityDetails?callback=?', function(data) { $.getJSON('https://json.geoiplookup.io/api?callback=?', function(data) {
//console.log(data.ip);
ips = data.geobytesremoteip; ips = data.ip;
$.getJSON("https://cors-anywhere.herokuapp.com/http://www.geoplugin.net/json.gp?ip="+ips,function(response){ $.getJSON("https://cors-anywhere.herokuapp.com/http://www.geoplugin.net/json.gp?ip="+ips,function(response){
$('#country_code').val(response.geoplugin_countryCode); $('#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