Veamos si entiendo, vos queres guardar la pagina en tu server?¿
o solo la queres mostrar. Si solo la queres mostrar usa un iframe.
Si queres guardarla como cache hace esto:
Código PHP:
$_DTO = @file_get_contents($_POST['url']);
$_U = 'cache/'.md5($_POST['url']).'.html';
@file_put_contents($_U,$_DTO);
echo '<iframe src="'.$_U.'" width="100%" heigth="100%"></iframe>';
Creamos el formulario
Código HTML:
<form action="<?=$_SERVER['PHP_SELF']" method="POST">
URL: <input type="text" name="url" size="100"><br/>
<input type="submit"></form>
El codigo completo:
Código PHP:
<?php
if($_POST['url']!=""){
$_DTO = @file_get_contents($_POST['url']);
$_U = 'cache/'.md5($_POST['url']).'.html';
@file_put_contents($_U,$_DTO);
echo '<iframe src="'.$_U.'" width="100%" heigth="100%"></iframe>';
}
?>
<form action="<?=$_SERVER['PHP_SELF']" method="POST">
URL: <input type="text" name="url" size="100"><br/>
<input type="submit"></form>
Saludos!