I want to create app when I an put url to input field and get some information about request(title of page and response code). I read many topics and understood that I can't send request to another domain like "google.com" and others. Then I created file in directory with my html file named hi.php and send request like this:
<script>
function getInformation() {
$.ajax({
type:"POST",
url:"http://localhost/test/hi.php",
success:function(data) {
alert(data);
}
});
}
</script>
but still have error
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
how can I fix it? What I did wrong?