I'm creating a little script where i wanna check whether a specific url is valid. I've found a this function below to do this. However this only returns true if it starts with http://
is it possible to make so that it also accept a url like following
www.example.com
example.com
Code:
if (filter_var('http://www.example.com', FILTER_VALIDATE_URL) !== FALSE) {
}