Gracias, haciendo una prueba me da error:
Código PHP:
die(file_get_contents("http://www.forosdelweb.com"));
Cita: Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in xxx.php on line 50
Warning: file_get_contents(
http://www.forosdelweb.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in xxx.php on line 50
Pero al final he usado esto:
Código PHP:
$server = $_GET['server'];
$file = "/".$_GET['file'];
$ip = gethostbyname($server);
$fp = fsockopen($ip, 80);
if ($fp) {
$crlf = "\r\n";
$com = 'GET '.$file.' HTTP/1.0'.$crlf.'Host: '.$server.$crlf.$crlf;
fputs($fp, $com);
while (!feof($fp)) {
$cont .= fgets($fp, 1024);
}
fclose($fp);
$cont = substr($cont, strpos($cont, "\r\n\r\n") + 4);
}
echo $cont;