
29/09/2006, 22:23
|
 | | | Fecha de Ingreso: julio-2006
Mensajes: 118
Antigüedad: 18 años, 7 meses Puntos: 0 | |
En mi servidor no sirve en otro si? amigos tengo este script q baje de desarrolo del web para comprobar dominios y en mi servidor local funciona y en un servidor de un amigo de hosting tambien en el mio de hosting no funciona no me da error ni nada aunq le quite el @ sigue sin hacer nada, tengo un servidor linux con php 4.4. Nuestro amigo cluster me dijo que revisara el envio de las variables lo hice e igual fallo aunq no se si lo hice bien, pero al menos en el localhost no me daba error.
<?
function verificar_url($url)
{
//abrimos el archivo en lectura
$id = @fopen($url,"r");
//hacemos las comprobaciones
if ($id) $abierto = true;
else $abierto = false;
//devolvemos el valor
return $abierto;
//cerramos el archivo
fclose($id);
}
?>
<html>
<head>
<title>Verificacion de URL</title>
</head>
<body>
<?
if (!isset($url))
{
?>
<form action="enlace.php" method="post">
Indica tu URL:<br>
<input type="Text" size="25" maxlength="100" name="url" value="http://">
<input type="Submit" value="Verificar!">
</form>
<?
}
else
{
$abierto = verificar_url($url);
if ($abierto) echo "La URL existe!";
else echo "La URL no existe o es inaccesible...";
}
?>
</body>
</html> |