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