Check if a URL exists/is online
Function to check if a URL is online/exists. function is_valid_url($url){ $url = @parse_url($url); if (!$url) { return false; } $url = array_map(‘trim’, $url); $url[‘port’] = (!isset($url[‘port’])) ? 80 : (int)$url[‘port’]; $path = (isset($url[‘path’])) ? $url[‘path’] : ”; if ($path == ”) { […]