warren buffet,
Используется аналог PHP функции с этого сайта.
function file_get_contents( url ) { // Reads entire file into a string
02
//
03
// + original by: Legaev Andrey
04
// % note 1: This function uses XmlHttpRequest and cannot retrieve resource from different domain.
05
06
var req = null;
07
try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
08
try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {
09
try { req = new XMLHttpRequest(); } catch(e) {}
10
}
11
}
12
if (req == null) throw new Error('XMLHttpRequest not supported');
13
14
req.open("GET", url, false);
15
req.send(null);
16
17
return req.responseText;
18
}