Tema: Ping
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/09/2005, 21:15
JavoGEVP
 
Fecha de Ingreso: julio-2003
Mensajes: 43
Antigüedad: 20 años, 8 meses
Puntos: 0
Ping

Gente tengo este código q está corriendo bajo un servidor linux.
Código PHP:
    <?php                            
        flush
();
        
$cmd sprintf("./ping.sh %s"$host);
        
exec($cmd$command_output);        
    
?>
        <script type="text/javascript">
           document.getElementById("<?=$unique_id_loop?>").style.display = 'none';                
           </script>
    <?
        
foreach($command_output as $r)
        {                        
             if( 
strstr($r'packets transmitted') == TRUE )
                {
                    if( 
strstr($r'0 received') == TRUE )
                        {
    
?>
        <td style="border:1px solid black; background-color:red;">
         <p>no responde</p>    
        <td>
        <?php
        
}
        else
        {
        
?>
        <td style="border:1px solid black; Background-color:green;">
        <p>responde</p>    
        <td>
        <?php
            
}                            
         }
}
        
$command_output "";
    
?>
Como lo modifico para que me funcione bajo un Windows XP, con el EasyPHP (apache, php, mysql, etc) instalados en la máquina?

Les re agradezco su respuesta!