SyntaxFix
Write A Post
Hire A Developer
Questions
You can use this function, but its will return false if website offline.
function isValidUrl($url) { $url = parse_url($url); if (!isset($url["host"])) return false; return !(gethostbyname($url["host"]) == $url["host"]); }