文章评分
次,平均分 :
package com.gaojig; import java.io.BufferedReader; import java.io.InputStreamReader; public class GetWebContent { public static String getWebCon(String domain) { // System.out.println("开始读取内容…("+domain+")"); StringBuffer sb = new StringBuffer(); try { java.net.URL url = new java.net.URL(domain); BufferedReader in = new BufferedReader(new InputStreamReader(url .openStream())); String line; while ((line = in.readLine()) != null) { sb.append(line); } System.out.println(sb.toString()); in.close(); } catch (Exception e) { // Report any errors that arise sb.append(e.toString()); } System.out.println(sb.toString()); return sb.toString(); } public static void main(String[] args) { getWebCon("http://www.gaojig.com/cr.html"); } }
除特别注明外,本站所有文章均为搞机哥原创,转载请注明出处来自http://www.gaojig.com/archives/10.html
板凳
牛
复制出来用看看
本人小白
学习了
我感觉 你这个站很有价格,要是把支付宝整合进来就好了。
请问建你这个网站需要WP的什么插件?
目前还没有发问题
你这个网站做得好啊
测试下评论用登录不
@aa哈哈,感觉怎么样?