public static String HttpConnect(String method, String urlString, String postContent) {
		URL url = null;
		StringBuffer response = null;
		try {
			url = new URL(urlString);
		} catch (MalformedURLException e) {
			e.printStackTrace();
			return null;
		}
		HttpURLConnection connection;
		try {
			connection = (HttpURLConnection) url.openConnection();
			connection.setRequestMethod(method);
			if (method.toUpperCase().equals("POST")) {
				connection.setDoOutput(true);
				connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
				DataOutputStream wr = new DataOutputStream (connection.getOutputStream());
				wr.writeBytes (postContent);
				wr.flush ();
				wr.close ();
			}
			connection.connect();
			
			//Get Response	
			InputStream is = connection.getInputStream();
			BufferedReader rd = new BufferedReader(new InputStreamReader(is));
			String line;
			response = new StringBuffer(); 
			while((line = rd.readLine()) != null) {
				response.append(line);
				response.append('\r');
			}
			rd.close();
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
		return response.toString();
	}