urlConnect.setConnectTimeout(5000);
urlConnect.setReadTimeout(30000);
urlConnect.setInstanceFollowRedirects(false);
urlConnect.setRequestMethod("HEAD");
int responseCode = urlConnect.getResponseCode();
urlConnect.disconnect();
urlConnect = null;
return (responseCode == HttpURLConnection.HTTP_OK);
} else {
HttpURLConnection urlConnect = (HttpURLConnection) urlConnection;
urlConnect.setConnectTimeout(5000);