Jump to content
  • 0

Vote Manager - Hopzone


petr.plasan

Question

Hello guys can me help with this ? I use Individual VoteManger a dont works me .. i  Have problem with  protected static int getHopZoneVotes()

	protected static int getHopZoneVotes()
	{
		int votes = -1;
		String Hopzonelink = Config.VOTE_LINK_HOPZONE;
		InputStreamReader isr = null;
		BufferedReader br = null;
		
		try
		{
			URLConnection con = new URL(Hopzonelink).openConnection();
			con.addRequestProperty("User-Agent", "Mozilla/4.76");
			isr = new InputStreamReader(con.getInputStream());
			br = new BufferedReader(isr);
			
			String line;
			while ((line = br.readLine()) != null)
			{
				if (line.contains("rank anonymous tooltip"))
				{
					votes = Integer.valueOf(line.split(">")[2].replace("</span", ""));
					break;
				}
			}
			
			br.close();
			isr.close();
		}
		catch (Exception e)
		{
			System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage());
		}
		return votes;
	}

whats is wrong ? Can me help ? please ?? :)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...