protected function urlCheck($url)
    {
        // first check if url has http:// prefix, if not, add it
        $parsed = parse_url($url);

        if (empty($parsed['scheme'])) {
            $url = 'http://' . ltrim($url, '/');
        }

        $file_headers = get_headers($url);

        if (!strpos($file_headers[0], "404 Not Found") > 0) {
            return true;
        }
        
        return false;
    }