I need to access new web page(different domain) from my current page. for that I have used following method.
<?php header("Access-Control-Allow-Origin:*"); ?>
<script type="text/javascript">
$( document ).ready(function() {
$("#content").load("<?php echo $_GET['url']; ?>");
});
</script>
but it gives me XMLHttpRequest cannot load http://adamsshs.pbworks.com/w/page/44430294/Algebra. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
I have search. most of the them are said to use <?php header("Access-Control-Allow-Origin:*"); ?>
. I have used that one but still same error. what am I missed.