Zend - The PHP Company




Link Checkers

Add Code


simple URL/ link checker  

Type: code fragment
Added by: sultanzahir
Entered: 29/04/2002
Last modified: 05/12/2001
Rating: - (fewer than 3 votes)
Views: 8850
This simple script validate any valid link or URL. Just write the concerned link in the text box and push the verify button.




<?
function urlfind($link)
{

if(
$link)
{
$file = @fopen ("$link""r");

                    }
                    if(
$file)
                    {         return 
true ;
                        
fclose($file);
                    }


                        }

if(
$link !="")
{
if((
urlfind($link))=="true")
{

  echo 
"your link exists";

}
else
{
  echo 
"your link doesn't exists" ;

    }
}

?>
<html>
<head>
</head>
<body bgcolor="ccdfed">
<h2>Link Checker</h2>
<form action="linkzend.php" method=post>
<font face="verdana" size=1>
<table border=0>
<tr><td>
Verify your link(e.g: http://zend.com)
</td>
</tr>
<tr>
<td><input type=text name=link size="40" >
</td></tr>
<tr><td>
<input type="submit" value="Verify">
</td></tr>
</table>
<br>
<a href="http://openit.de/~sultan/">from : Sultan Zahir Khan</a><br>
<a href="mailto://sultanzahir@yahoo.com">email : sultanzahir@yahoo.com</a></font>
</body>
</html>


Usage Example


See the example


Rate This Script





Search



This Category All Categories