I have the URL of a remote page from another domain that I have to download, parse and update the DOM of the current page. I found examples of this with the new ActiveXObject ("Msxml2.XMLHTTP") , but this, in my opinion, is limited to IE, and with the new java.net.URL , but I don't want to use Java. Are there any alternatives?
The same domain rules will be available to you.
1) A proxy server through your server. browser-> your server-> their server-> your server-> browser.
2) . . javascript flash , . Silverlight , ...
3) . ... , javascript.
PHP Script AJAX, file_get_contents()? . .
file_get_contents()
script, , - . XMLHttpRequest, AJAX script, html (?) .
, . , , . ? , .
, . iframes JS-, . "" () , .
- URL- .
.
Just use PHP:
<?php $url = "http://www.domaintoretrieve.com"; ob_start(); include_once( $url ); $html = ob_get_contents(); ob_end_clean(); ?>
$ html contains the entire page for management if necessary.
The XMLHTTPRequest object is common to most modern browsers and is a powerful AJAX web application.