public static boolean checkURL(String url) {
		url = url.toLowerCase();
		URL u = null;
		int code = -1;
		try {
			u = new URL( url );

			if (url.startsWith( "http://" )) {
				HttpURLConnection conn = ( HttpURLConnection ) u.openConnection();
				code = conn.getResponseCode();
			}
			else if (url.startsWith( "https://" )) {
				HttpsURLConnection conn = ( HttpsURLConnection ) u.openConnection();
				conn.setHostnameVerifier( new HostnameVerifier() {
					public boolean verify(String hostname, SSLSession session) {
						return true;
					}
				} );
				code = conn.getResponseCode();
			}
		}
		catch (IOException e) {
			// do nothing
		}
		return (code == 200) ? true : false;
	}