I need to get data from another site. The site returns json. I tried this:
function get_data() {
$.getJSON("https://kde.link/test/get_field_size.php",
function(data){
var get_width = data.width;
var get_height = data.height;
/* some code here */
});
};
But this doesn't work. Moreover, I've got this mistake: XMLHttpRequest cannot load https://kde.link/test/get_field_size.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:8080' is therefore not allowed access. How can I get data from another site?