Use godamn [ code ] tag. Here you go.. If you tell me later that it's not working, imma get mad. Also, you should rework that shit-code. Java 6 ages lol.
Link example
http://l2topzone.com/totalvotes.php?id=9466
getTopZoneVotes, pastebin for better view, dat messed formatting.. http://pastebin.com/Y5m3vjcY
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)
{
if (inputLine.contains("Votes:"))
{
votes = Integer.valueOf(inputLine.split("<br>")[1].replace("</div>", ""));
break;
}
}
}
}
}
catch (Exception e)
{
announce("TOPZONE is offline. We will check reward as it will be online again.");
}
return votes;
}