| | |
| | | import org.apache.http.util.EntityUtils;
|
| | | import org.yeshi.utils.entity.ProxyIP;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class HttpUtil {
|
| | |
| | | private static String getShortLink3(String url) {
|
| | | try {
|
| | | String totalUrl = String.format(
|
| | | "http://api.ft12.com/api.php?format=json&url=%s&apikey=Lqh4eXURkvKhbboXwz@ddd",
|
| | | "http://h5.flq001.com/short/createShort?url=%s",
|
| | | URLEncoder.encode(url, "UTF-8"));
|
| | | String result = get(totalUrl, null);
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | return data.optString("url");
|
| | | return data.optString("short_url");
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|