I want to get a text from another domain using javascript or PHP. However, it gives me an error while trying to access another domain. I tried this piece of code:
$.ajax({
url:'http://www.corsproxy.com/' +
'en.wikipedia.org/wiki/Briarcliff_Manor,_New_York',
type:'GET',
success: function(data){
$('#content').html($(data).find('#firstHeading').html());
}
});
and the error is
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Is there anyway that I can grab the content of the html for another domain?
Thanks!