RE: [PHP-ES] Leer URL o ficheros con fopen

From: Date: Tue, 19 Sep 2000 12:21:48 +0000
Subject: RE: [PHP-ES] Leer URL o ficheros con fopen
References: 1 2  Groups: php.general.es 
Request: Send a blank email to general-es+get-1695@lists.php.net to get a copy of this message
yo tambien lo estuve intentando y no me funciono ----- Original Message ----- From: Devta Singh <devta.singh@eai.es> To: <lista@phpes.com> Sent: Tuesday, September 19, 2000 12:46 PM Subject: [PHP-ES] Leer URL o ficheros con fopen > Hola listeros, > Como en PHP se pueden abrir conexiones via FTP y HTTP de forma automática, > me emocione y pense que se podía leer el contenido de una página web remota > desde el PHP, no digo el codigo fuente sino el HTML que devuelve el servidor > y teclee este código (que no funciona) ¿Alguien sabe porque no funciona?: > (incluso lo he probado con http://127.0.0.1/index.php3 pero > simepre me dice > que no es legible) > > > <?php > if(!$viejo){ > ?> > <FORM action="" method="post"> > <INPUT type="text" name="nomfich" size="50" > maxlength="255" value=""> > <INPUT type="hidden" name="viejo" value="1"> > <INPUT type="submit" name="Enviar" value="Ver Fichero/URL"> > </FORM> > <?php > } else { > > > omfich){ > $nomfich="http://127.0.0.1/index.html"; > } > if(is_readable($nomfich)){ > $fhandle=fopen($nomfich,"r"); > if(!$fhandle){ > die("No existe el fichero $nomfich"); > }else{ > $fichero=readfile($fhandle); > print $fichero; > } > } else { > print "El fichero $nomfich no es legible..."; > } > } > ?> > > ------------------------------------------------------ > Devta Singh > Webmaster ZDNet España > devta@zdnet-es.com > ------------------------------------------------------ > > > > --------------------------------------------------------------------- > Para dar de baja la suscripción, mande un mensaje a: > lista-unsubscribe@phpes.com > >

« previous php.general.es (#1695) next »