if (!filter_var($site, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED))...
This validator shows:
https://www.g - as valid address !
www.google.com - as invalid address !
If you type some address into address bar, and you see that it works - it should be a valid address. And vice versa. I need such one validator. Or - I'm missing something in the above code ?