Here is an example to start working with. It's just a copy-paste, but it should work.
The output of your request is stored in myString.
Oh, never perform such operations on the GUI thread; run them in a separate thread.
// An the Android manifest, add:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
String myString;
String url = "http://www.yoursite.com/yourphpscript.php";
HttpClient httpclient = new DefaultHttpClient();
HttpGet request;
try {
request = new HttpGet(new URI(url));
request.addHeader("User-Agent", "Android");
HttpResponse response = httpclient.execute(request);
StatusLine statusLine = response.getStatusLine();
if (statusLine.getStatusCode() == HttpStatus.SC_OK) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.getEntity().writeTo(out);
out.close();
myString = out.toString();
}
}
catch (URISyntaxException e1) {
e1.printStackTrace();
}
catch (ClientProtocolException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}