sábado, 1 de octubre de 2011

Comprobar si el servidor web esta caído - PHP Code

Publicado por OverNet en sábado, octubre 01, 2011 ,
Comprobar si el servidor o script esta caído

PHP SCRIPT
Saber si el servidor en realidad esta caído o es nuestra pc o conexión de internet.
Servidor caido
Autor: HielaSangre (Daniel Godoy)
Programación: PHP

<html>
<head>
<style>
body
    {
    background-color:#FFF;  
    font-family: Verdana;
    color: #000;
    }
input{
      -moz-border-radius: 3px;
      font-family: Verdana;
      background-color: #FFF;
      border: 1px solid #CCC;
      color: #000;
      font-size: 25px;
      margin: 3px;
      padding: 3px;
     }
#sin_borde
          {
           border-width:0;
           cursor:pointer;
           display:block;
           font-family: Verdana;
          }
td
  {
    font-size: 25px;
    font-family: Verdana;
  }
</style>
<title>Averigua si un servidor esta caído o eres tu!</title>
</head>
<body>
<center>
<?php
/**
*
*
* @author Daniel Godoy
* @copyright 2011
* @Site www.0x3a.com.ar www.remoteexecution.com.ar www.delincuentedital.com.ar
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
*
**/
set_time_limit(0);
$url=htmlentities($_POST['url']);
if(isset($url)&&($url!= ""))
                            {
                            $online = @fsockopen($url, 80);
                            if ($online)
                                        {
                                         echo '¡Eres tú, <a href="http://'.$url.'" target=_blank>'.$url.'</a> está funcionando ok!
                                              <br><a href="'.$_SERVER['PHP_SELF'].'">¿Deseas chequear otro sitio?</a>
                                              ';
                                        } else {
                                                echo '¡No, no eres tú! <a href="http://'.$url.'" target=_blank>'.$url.'</a> está caído.
                                                <br><a href="'.$_SERVER['PHP_SELF'].'">¿Deseas chequear otro sitio?</a>
                                                ';
                                               }
                            }else{
                                 echo '
                                       <form name="pr" action="" method="post">
                                       <table align="center">
                                       <td>¿<input id="boton" type="text" name="url" size="15" maxlength="300" value=""/> ESTA CAIDO..</td>
                                       <td></td>
                                       <td><input type="submit" name="submit" id="sin_borde"  value="O SOY YO?" /></td>
                                       </table>
                                      ';
                                 }



?>
</center>
</body>
</html>

Back Top

1 comentarios:

Publicar un comentario

Blaaa blaa y + blaa.. escribe las dudas que tengas :D

- No incluyas Correos electrónicos por seguridad propia.
- No SPAM/Flood.
- Se borrará cualquier comentario ofensivo, racista o vulgar.