可按Ctrl+D收藏 蚂蚁资源网

蚂蚁资源网

短网址生成源码(短链接生成源码)

  • 全部评论(3)
  • erpang666
  • 快速生成html代码的软件非dw莫属了,纯傻瓜式操作,话说现在谁还用html代码作网站。早就被php取代了。
  • 2021-02-26 12:10:05
  • hz
  • 学习前端的话,dw是可以自动生成网页界面,但是他的自适应不行,有的地方还是要自己改的,所以基本上是没有什么软件是可以自动生成代码的。
  • 2021-02-12 03:06:51
  • 织梦源码
  • java调用百度api生成短链接,跪求java代码,不要复制网上的,要自己亲测实际能运行的!谢谢,package com.zhidao.www;import java.io.BufferedReader;import java.io.InputStream;import java.io.InputStreamReader;import java.net.HttpURLConnection;import java.net.URL;public class TestShort {public static void main(String[] args) {// TODO Auto-generated method stubString httpUrl = "http://apis.baidu.com/3023/shorturl/shorten";String httpArg = "url_long=http%3A%2F%2Fapistore.baidu.com%2Fastore%2Fshopready%2F1973.html";String jsonResult = request(httpUrl, httpArg);System.out.println(jsonResult);}/*** @param urlAll* :请求接口* @param httpArg* :参数* @return 返回结果*/public static String request(String httpUrl, String httpArg) { BufferedReader reader = null; String result = null; StringBuffer sbf = new StringBuffer(); httpUrl = httpUrl + "?" + httpArg; try { URL url = new URL(httpUrl); HttpURLConnection connection = (HttpURLConnection) url .openConnection(); connection.setRequestMethod("GET"); // 填入apikey到HTTP header connection.setRequestProperty("apikey", "自己的apikey"); connection.connect(); InputStream is = connection.getInputStream(); reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String strRead = null; while ((strRead = reader.readLine()) != null) { sbf.append(strRead); sbf.append("\r\n"); } reader.close(); result = sbf.toString(); } catch (Exception e) { e.printStackTrace(); } return result;}}这个可以用 不过要自己申请下api key 得到的字符串也要自己解析
  • 2021-02-12 03:06:51
  • 商品推荐