Syntax
1
2
3
4
5
|
<?php
$url = "http://koonk.com";
$check = checkvalidURL($url);
echo $check; //if returns 1 then URL is valid.
?>
|
1
2
3
4
5
6
7
8
|
function isvalidURL($url)
{
$check = 0;
if (filter_var($url, FILTER_VALIDATE_URL) !== false) {
$check = 1;
}
return $check;
}
|
1
2
3
4
5
|
<?php
$url = "http://koonk.com";
$check = checkvalidURL($url);
echo $check; //if returns 1 then URL is valid.
?>
|
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment