URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("User-Agent","Mozilla/4.0 compatible; MSIE 6.0; Windows NT 5.1;DigExt");//最关键的!!! connection.connect(); in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));