Tag Archives: Php File

Android phpmySQL connection redone.

By | July 27, 2011

Hi all.. Most of our visitors had problem with one of our previous post on Android-php connection. So here I am posting another simple example to connect with a php file. Here I am simply putting an echo in the php file which ehoes back the data from the android side. Here are the things you need to… Read More »

How to access a remote php file from ANDROID?

By | January 19, 2011

For working on the localhost use 10.0.2.2 and for remote use the IP or domain name of the server. The following code does this. [java] package com.pack; import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import android.app.Activity; import android.os.Bundle; import android.widget.Toast; public class active extends Activity { HttpPost httpPost; ResponseHandler response; String… Read More »