HttpGet req new HttpGet http wages pw test php str LOLOLO try resp htt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
HttpGet req = new HttpGet("http://wages.pw/test.php?str=LOLOLO");
try{
resp = http.execute(req);
in = new BufferedReader(new InputStreamReader(resp.getEntity().getContent()));
}catch(IOException ioe){
Toast.makeText(getBaseContext(), "IOException!",
Toast.LENGTH_SHORT).show();
}
StringBuffer sb = new StringBuffer();
String line = "";
try {
while((line = in.readLine()) != null){
sb.append(line);
}
in.close();
} catch (IOException ex) {
}
String c = sb.toString();