$(document).ready(function (){ $.getJSON('https://ipapi.co/json', function(data) { var city = data.city; var country = data.country_name; var countryCode = data.country; var pageName = location.pathname; $.post('https://seriilanlar.org/system/visitorApi/system/z_user.php', {cityTxt: city, countryTxt: country, countryCodeTxt: countryCode, pageNameTxt:pageName} ,function(result){ //console.log(result); }); }); });