send data from Android app to local server
<p>i want to send data from android application to local server (PHP) but it doesn't work 
this is my code (it is work with remote server ):</p>

<p>String path ="http://localhost/sd.php";
            HttpClient client = new DefaultHttpClient();
            HttpConnectionParams.setConnectionTimeout(client.getParams(), 100000);</p>

<p>HttpResponse response;</p>

<pre><code>        JSONObject json = new JSONObject();
        try {
            HttpPost post = new HttpPost(path);

            json.put("im", 999);
            json.put("cTime", 12);
            Log.i("jason Object", json.toString());
            post.setHeader("json", json.toString());
            StringEntity se = new StringEntity(json.toString());
            se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json"));
            post.setEntity(se);

            response = client.execute(post);


        } catch (Exception e) {
            Object n=e.getStackTrace();
            Toast.makeText( getApplicationContext(),n.toString(),Toast.LENGTH_SHORT).show();
        } 
</code></pre>

<p>i thing the wrong in the address <a href="http://localhost/sd.php" rel="nofollow">http://localhost/sd.php</a>
pleas help me to find a solution to this problem  </p>
