how to grab whole remote page using java script..
example i want to grab www.remotesite.com using java script to show its full content on other remote site..
pls help me
You cant because of cross site scripting unless you have set permissions on the server you are trying to grab from or you have set permissions like on web browser extensions
Added after 2 minutes:
Here is how to do it if you have got permissions:
PHP Code:<script type="text/javascript">
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "http://remotesite.con", false);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(null);
var respon = xmlhttp.responseText;
document.write(respon);
</script>
Last edited by something else; 07-09-12 at 16:19.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks