i use this on my server and works like i want...all works fine
here is the fix for topzone
use this link but change id https://l2topzone.com/tv.php?id=12609
public static int getTopZoneVotes()
{
int votes = -1;
try
{
final URL obj = new URL(Config.VOTES_SITE_TOPZONE_URL);
final HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.addRequestProperty("User-Agent", "L2TopZone");
con.setConnectTimeout(5000);
final int responseCode = con.getResponseCode();
if (responseCode == 200)
{
try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())))
{
String inputLine;
while ((inputLine = in.readLine()) != null)
{
votes = Integer.valueOf(inputLine);
break;
}
}
}
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("TOPZONE is offline. We will check reward as it will be online again.");
}
return votes;
}