g bisa koneksi ke localhost

uuuh… it’s make me confused in posting data to server local on Android. But i continued to try and get positive result. this my simple code :

HttpClient cliet=new DefaultHttpClient();
HttpPost post=new HttpPost(http://localhost/testing/input.php); // its wrong
HttpPost post=new HttpPost(http://192.168.56.1/testing/input.php); //its true in my project
HttpResponse response=client.execute(post);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s