Connection must be fixed...search my vote system shared and take connection from there...in share section..will work fine with https details link here you are just change the config with yours
protected static int getHopZoneVotes()
{
int votes = -1;
try
{
final URL obj = new URL(Config.VOTES_SITE_HOPZONE_LINK_HOP);
final HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.addRequestProperty("User-Agent", "L2Hopzone");
con.setConnectTimeout(5000);
final int responseCode = con.getResponseCode();
if (responseCode == 200)
{
try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())))
{
String line;
while ((line = in.readLine()) != null)
{
if (line.contains("Total Votes") || line.contains("rank tooltip") || line.contains("no steal make love") || line.contains("no votes here") || line.contains("bang, you don't have votes") || line.contains("la vita e bella") || line.contains("rank anonymous tooltip"))
{
String inputLine = line.split(">")[2].replace("</span", "");
votes = Integer.parseInt(inputLine);
break;
}
}
}
}
}
catch (Exception e)
{
System.out.println("Server HOPZONE is offline Trying to Reconnect");
Announcement.VoteAnnouncements("HOPZONE is offline...Trying to Reconnect");
e.printStackTrace();
}
return votes;
}