|
|
|
|
Like this code?
Show the author your appreciation.
|
|
| |
A function for checking the existence of a given URL. The usage of the function is similar to
file_exists. The only parameter of the function is the URL to be verified. The function returns true if the URL exists, else false.
| <?php
/*=========================================================================*/
# A function for checking the existence of a given URL. The usage of the #
# function is similar to file_exists. The only parameter of the function #
# is the URL to be verified. The function returns true if the URL exists, #
# else false. #
/*=========================================================================*/
function url_exists($url)
{
$handle = @fopen($url, "r");
if ($handle === false)return false;
fclose($handle);
return true;
}
$url = isset($_GET['url']) ? $_GET['url'] : 'http://www.weberdev.com/';
?>
<html>
<head>
<title>URL Verification</title>
</head>
<body>
<table style="width:100%;height:100%;">
<tr><td>
<center><form method="get">
<?php
if(url_exists($url))
{
echo "<span style='color:green;font:bold 12px Verdana;'>$url is valid.</span><br><br>";
}else
{
echo "<span style='color:red;font:bold 12px Verdana;'>$url is invalid.</span><br><br>";
}
?>
<input type="text" name="url" size="35" value="<?php echo $url;?>"> <input type="submit" value="Go">
</form>
</center></td></tr></table>
</body>
</html> | | |
|
| PHP Script to find url links in a page Categories : PHP, URLs, Regexps, Arrays | | | php jump urls...the best way Categories : PHP, URLs, Filesystem | | | Get the self URL of current page Categories : PHP, URLs, Beginner Guides | | | SubmitForce URL power submitter (searchengine submission class) Categories : PHP, Search Engines, URLs, PHP Classes | | | Link Extractor - This function is used to extract links from a given URL. This will convert relative path into absolute path and also remove PHPSESSID stuff. Categories : PHP, URLs, Regexps | | | PHP5 URL Object Categories : PHP, PHP Classes, URLs, Strings | | | Class to Create protected URLs Categories : PHP, PHP Classes, URLs | | | phpHoo2 (Xhoo using php3/MySQL) is a Yahoo-like link directory. Much like the Open Directory Project (dmoz.org). Categories : PHP, Complete Programs, Directories, MySQL, URLs | | | PHPRecommend v1.0 - "Recommend this page to a friend" script written in
PHP. Easy to install Categories : PHP, URLs, Complete Programs, Email, Site Planning | | | PHPLinkRot v1.0 - program which allows users to report broken links on
your website just by clicking a button. Works well on custom 404 pages Categories : PHP, Complete Programs, Debugging, URLs, Site Planning | | | Pageinfo: Array containing page URI, page query string (parameters), request method (GET or POST) and the complete URI Categories : Variables, PHP Options and Info, Arrays, URLs, PHP | | | valid link! Categories : HTTP, URLs, PHP | | | a file explorer for the web, filesystem php php3 files dirs directories pictures files windows linux system list ls scripts Categories : PHP, URLs, Directories, Filesystem | | | Gonx URLs - This class is meant to generate URLs for accessing application dynamically generated pages based on parameters passed in the URL.
Categories : PHP, PHP Classes, Navigation, URLs | | | Remove URL Parameter Substr Strstr Categories : PHP, URLs, Strings | |
|
|
|