I am getting JSON data through an API using jQuery. Now I am unable to get the JSON data in my PHP code
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="application/javascript">
$(document).ready(function() {
$.getJSON("http://www.telize.com/geoip?callback=?",
function(json) {
document.write("Geolocation information for IP address : ", json.ip);
document.write("Country : ", json.country);
document.write("Latitude : ", json.latitude);
document.write("Longitude : ", json.longitude);
}
);
});
</script>
//result is below on browser
//Geolocation information for IP address : 45.114.126.32Country : PakistanLatitude : 30Longitude : 70
Now I want to get the latitude and longitude values in my PHP code. How can I parse this code?