Foros del Web » Programando para Internet » PHP »

Warning: file_get_contents()

Estas en el tema de Warning: file_get_contents() en el foro de PHP en Foros del Web. Saludos, Ando realizando un sitio y al montarlo me arroja estos errores Warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name in /home/ucoxadvc/public_html/bezour/functions/functions_localization.php on line 36 Warning: ...
  #1 (permalink)  
Antiguo 01/06/2014, 12:16
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Warning: file_get_contents()

Saludos,

Ando realizando un sitio y al montarlo me arroja estos errores


Warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name in /home/ucoxadvc/public_html/bezour/functions/functions_localization.php on line 36

Warning: file_get_contents(http://api.easyjquery.com/ips/?ip=19...1.90&full=true) [function.file-get-contents]: failed to open stream: operation failed in /home/ucoxadvc/public_html/bezour/functions/functions_localization.php on line 36

la linea 36 es

Código PHP:
$file "./library/_cache/IP/".$ip
            
            if(!
file_exists($file)) { 
                
// request 
                
$json file_get_contents("http://api.easyjquery.com/ips/?ip=".$ip."&full=true"); 
                
$f fopen($file,"w+"); 
                
fwrite($f,$json); 
                
fclose($f); 
            } else { 
                
$json file_get_contents($file); 
            } 
Alguien puede ayudarme???

Gracias de antemano
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...
  #2 (permalink)  
Antiguo 01/06/2014, 12:51
Avatar de Italico76  
Fecha de Ingreso: abril-2007
Mensajes: 3.303
Antigüedad: 17 años, 1 mes
Puntos: 292
Respuesta: Warning: file_get_contents()

- Para leer de un sitio externo necesitas tener habilitada una directiva en el php.ini / ini_set()

- Tu URI esta mal pues no existe o esta caido el servidor
__________________
Salu2!
  #3 (permalink)  
Antiguo 01/06/2014, 13:03
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Respuesta: Warning: file_get_contents()

Gracias, en efecto el fallo es en la web, debe estar caida pues antes funcionaba perfecto...
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...

Etiquetas: html, warning
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:50.