private int getVotes()
{
URL url = null;
InputStreamReader isr = null;
BufferedReader in = null;
try
{
url = new URL(http);
URLConnection con = url.openConnection();
con.addRequestProperty("User-Agent", "Mozilla/4.76");
isr = new InputStreamReader(con.getInputStream());
in = new BufferedReader(isr);
String inputLine;
while ((inputLine = in.readLine()) != null)
{
// for top-zone
if (inputLine.contains("Votes:"))
{
return Integer.parseInt(inputLine.split(">")[3].replace("</div", ""));
}
}
}
worked , thank you :)
may i ask you something else? How i can make one item , to change the acces lvl of a player , i need this to give auto acces on the VIP buffer. or how can i make vip buffer , check for items on players invetory and after give acces? :)