Ver Mensaje Individual
  #40 (permalink)  
Antiguo 11/05/2010, 21:16
Avatar de raxper
raxper
 
Fecha de Ingreso: enero-2010
Ubicación: ------
Mensajes: 472
Antigüedad: 14 años, 3 meses
Puntos: 2
Pregunta Respuesta: [APORTE] file_get_contents(), cURL, HTTP_Request

Código PHP:
<?php
$link 
"noexiste.php";
$url "http://www.example.com/$link";
$page file_get_contents(''.$url.'');
echo 
$page;
?>
Existe alguna forma de que cuando este tenga el link roto, file_get_contents() no me vote la url, si no otra != cosa ?


//////////////////////////////////////////////////////////////////
o sea que no me vote esto cuando la url esta rota x) si no, algo distinto un documento blanco o otra cosa

Código PHP:
Warningfile_get_contents(http://www.example.com/noexiste.php) 
[function.file-get-contents]: failed to open streamHTTP request failed
HTTP/1.1 404 Not Found 
in C
:AppServwwwpaginaestudio.php on line 4 

Última edición por raxper; 11/05/2010 a las 21:24