public class Ts{
public static void main(String[] args) {
try{
URL url = new URL("http://127.0.0.4");
URLConnection urlcon = url.openConnection();
urlcon.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
urlcon.setRequestProperty("Accept-Encoding", "gzip, deflate, sdch");
urlcon.setRequestProperty("Connection", "keep-alive");
urlcon.setRequestProperty("User-Agent", "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.23 Mobile Safari/537.36");
urlcon.setDoOutput(true); //post
urlcon.setDoInput(true); //post
PrintWriter out = new PrintWriter(urlcon.getOutputStream());
out.print(false);
BufferedReader in = new BufferedReader(new InputStreamReader(urlcon.getInputStream(), "UTF-8"));
String s;
while((s = in.readLine()) != null){
System.out.println(s);
}
}catch(Exception ex){
ex.printStackTrace();
}
}
}