I have a php script stored in Xampp server, and want that my application execute it to perform a task. In eclipse nothing happend with android.txt at server side.
The following is my code for android app
String url = "http://my.site.php?data=hello";
HttpClient client = new DefaultHttpClient();
try {
client.execute(new HttpGet(url));
} catch(IOException e) {
//do something here
}
following is my php code at server side.
$name=$_GET['data'];
$file=fopen("./android.txt","w");
fwrite($file, $name);
fclose($file);
Though I am running php from mozila browser, it works fine. but this code is not working for android.