Java tutorial
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.net.URLEncoder; public class Main { private static final String URL = "http://www.tuling123.com/openapi/api"; private static final String API_KEY = "dd763102b6013f48bb47ec2533e0f4ac"; private static String setParams(String msg) { String url = ""; try { url = URL + "?key=" + API_KEY + "&info=" + URLEncoder.encode(msg, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return url; } }