I need to fetch the data from one of my files located at different url.Here is the code that shows the ajax request sent to the server
<script>
    alert('return sent');
    $.ajax({
        type: "POST",
        url: "example.com/show.php",
        data: 1
    })
    success: function data(response) {
        alert(data); // apple
    }
</script>
Here is the code on another file that I am accessing through Ajax (example.com/show.php).
<?php
    echo 'Hello '; 
?>
However I am getting Cross-Origin Request Blocked: warning in my console.
 
     
    