private static int getRemoteVersion() {
		URL url = null;
		try {
			url = new URL(SERVER_URL + "version.txt");
		} catch (MalformedURLException e2) {
			e2.printStackTrace();
		}
		try {
			URLConnection urlConnection = url.openConnection();
			urlConnection.setAllowUserInteraction(false);

			InputStream urlStream = url.openStream();
			byte buffer[] = new byte[1000];
			int numRead = urlStream.read(buffer);
			String content = new String(buffer, 0, numRead);

			while ((numRead != -1) && (content.length() < 1024)) {
				numRead = urlStream.read(buffer);
				if (numRead != -1) {
					String newContent = new String(buffer, 0, numRead);
					content += newContent;
				}
			}
			content = content.trim();
			System.out.println("Remote version is " + content + ".");

			return Integer.valueOf(content);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IndexOutOfBoundsException e1) {
			e1.printStackTrace();
		}

		return -1;
	}