Check if it is a valid url (example.com IS NOT a valid URL)
function isValidURL($url)
{
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*
(:[0-9]+)?(/.*)?$|i', $url);
}
How to use the function:
if(!isValidURL($fldbanner_url))
{
$errMsg .= "* Please enter valid URL including http://<br>";
}
Source: http://phpcentral.com/208-url-validation-in-php.html