Anyway i fixed this but got another problem
If player votes in my vote page and his username for example is "pro killer" then he won't retrieve any cash ingame.. Because his name has space...
Code:
public static boolean checkVotes(String playerName) {
try {
URL url = new URL("http://mydomainishere/vote.php?type=checkvote&username="+playerName);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String results = reader.readLine();
if(results.length() > 0) {
if(results.equals("user needs reward..."))
return true;
else
return false;
}
} catch (MalformedURLException e) {
System.out.println("Malformed URL Exception in checkVotes(String playerName)");
} catch (IOException e) {
System.out.println("IO Exception in checkVotes(String playerName)");
}
return false;
}