Friday 16 August 2019

javascript - Can get information (.get)

I try to fetch information from a public website area.
Let's just say I want the Product name and a Price of it only.
When I try to get the information from the site it giving me an error:





No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://demo.com' is therefore not allowed access.




The script I use is:



$(document).ready(function() {
$.get("http://www.ebay.com", function(data) {
console.log(data)

});
});

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...