Código PHP:
<?php
//---------------------------- comprobar URL si existe ----------------------------\\
function url($url)
{
$fp=@fopen($url,"r");
if($fp){
return true;
}else{
return false;
}
@fclose($fp);
}
$existe=url("$posturlnuevo");
if($existe){
}else{
echo <<< HTML
<br><br><br><br><br><br>
<table align="center" cellspacing=1 cellpadding=0 width="459" bgcolor=black border=0>
<tbody><tr height="19"><br>
<td valign="bottom" bgcolor="DarkSeaGreen" height="19"><font color="DarkSeaGreen">_<img src=images/clock.gif border=0 height=11 width=11> </font><font color=Black size=2>Bienvenido<b> $_SESSION[usuario_login]</b></font></td>
</tr></tbody></table>
<table align="center" cellspacing=1 cellpadding=0 width="459" bgcolor=black border=0>
<tbody><tr height="19">
<td valign="middle" bgcolor="Gray" height="59"><font color=White size=2><b><center>ERROR LA DIRECCION NO EXISTE<br>O ESTA MAL ESCRITA</b></font></td>
</tr></tbody></table>
<table align="center" cellspacing=1 cellpadding=0 width="459" bgcolor=black border=0>
<tbody><tr height="19">
<td valign="middle" bgcolor="Gray" height="25"><center><input type="button" value="Volver" onclick="history.back()" class="botones3"></center></td>
</tr>
<tr height="4"><td colspan="2" align="center" bgcolor=DarkSeaGreen width="451" height="4"></td></tr>
</tbody></table>
HTML;
exit;
}
//---------------------------- comprobar URL si existe ----------------------------\\
?>
PD: se supone que la variable "$posturlnuevo" es la que lleva la direccion que quieres scanear.... este script recoge la direccion de un formulario mediante POST....;)