Good day to all.
Like many here, I sit now writing a system in php.
I needed to get data from another domain. In their web interface, I spied an ajax request:
$.ajax({ url: '/lenta/get_last_opened_organization', success: function( data ){ $("#last_viewed").html(data) } });
I took it and inserted it with a link to their domain, it turned out like this:
$.ajax({ url: 'http://domen/lenta/get_last_opened_organization', success: function( data ){ $("#last_viewed").html(data) } });
When making a request, the browser informed me:
XMLHttpRequest cannot load http://domen/lenta/get_last_opened_organization. Origin http://my-domen.ru is not allowed by Access-Control-Allow-Origin.
I do not exactly understand why but access is denied.
The question is how to pretend to make a request from their domain ..
ps
The jQquery AJAX documentation found the following:
Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol.
Does this problem unsolvable ?!