Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/11/2008, 12:49
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 9 meses
Puntos: 2135
Respuesta: Codigo malicioso?

La causa de todos tus problemas estan en el primer error:
Cita:
06-Nov-2008 20:58:09] PHP Warning: fopen(http://api.wunderground.com/auto/wui...ons/08306.html) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Connection refused in /home/public_html/weather/functions_forecast.php on line 16
Cuando te intentaste conectar a api.wunderground.com, el servidor te rechazo la conexión por lo que posteriormente al tratar de usar el puntero te da error.

Para eliminar los demas errores puedes usar algo así:
Código php:
Ver original
  1. $forecast_url = "http://api.wunderground.com/auto/wui/geo/ForecastXML".$loc_id;
  2.     $url = $forecast_url;
  3.     $fp = @fopen($url,"r");
  4.     if($fp == false){
  5.         die("error");
  6.     } else{
  7.         $mensaje = "OK";
  8.         while (!feof ($fp))
  9.         $xml .= fgets($fp, 4096);
  10.         fclose ($fp);
  11.         $fw = fopen($cachefilename, 'w');
  12.         fwrite($fw, $xml);
  13.         fclose($fw);
  14.     }
  15.    
  16.     $parser = xml_parser_create(  );
  17.     xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
  18.     xml_parse_into_struct($parser,$xml,$values,$index);
  19.     xml_parser_free($parser);
  20.  
  21.  
  22.     $maxima1 = htmlspecialchars($values[$index[celsius][0]][value]);
  23.     $minima1 = htmlspecialchars($values[$index[celsius][1]][value]);
  24.    
  25.     $counter = 0;
  26.     $row_counter = 2;
  27.  
  28.     $xml="";