将想法与焦点和您一起共享

java数据传给wap站点发布者:本站     时间:2020-05-06 15:05:25

/**
     * 数据传给wap站点
     *
     * @param message
     * @throws IOException
     */
    private void settoWap(String message) throws IOException {
        URL url;
        try {
            url = new URL(
                    "="
                            + message+"&mobile="+phone);
            HttpURLConnection connection = (HttpURLConnection) url
                    .openConnection();
            connection.setRequestMethod("POST");
            connection.setDoOutput(true);
            PrintWriter out = new PrintWriter(connection.getOutputStream());
            out.close();
            BufferedReader in = new BufferedReader(new InputStreamReader(
                    connection.getInputStream()));
            String line;
            while ((line = in.readLine()) != null) {
                LogTool.WriteLog(line);
                System.out.println(line);
            }
            in.close();

        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

    }

-



选择我们,优质服务,不容错过
1. 优秀的网络资源,强大的网站优化技术,稳定的网站和速度保证
2. 15年上海网站建设经验,优秀的技术和设计水平,更放心
3. 全程省心服务,不必担心自己不懂网络,更省心。
------------------------------------------------------------
24小时联系电话:021-58370032