String downloadURL() {
		String line, result = null;
		int code = 200;
		boolean first = true;
		do {
			if (first) {
				first = false;
			} else {
				sleep(1000);
			}
			try {
				result = "";
				URL url = formURL();
				HttpURLConnection conn = (HttpURLConnection) url.openConnection();
				conn.setRequestProperty("User-Agent", Main.USER_AGENT);
				conn.setRequestMethod("GET");
				BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
				while ((line = rd.readLine()) != null) {
					result += line;
				}
				rd.close();
				code = conn.getResponseCode();
				if (code == 200) {
					try {
						JSONObject obj = new JSONObject(result);
						if (obj.has("error"))
							code = new JSONObject(result).getInt("error");
					} catch (JSONException e) {}
				}
			} catch (MalformedURLException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			}
		} while (code != 200);
		return result;
	}