Run php script stored in the server?

前端 未结 2 1347
独厮守ぢ
独厮守ぢ 2021-02-06 17:30

I have a php script stored in Wamp server, and want that my application execute it to perform some image treatement from server then the server send the result to the Android ph

2条回答
  •  庸人自扰
    2021-02-06 18:02

    Simply perform HTTP get request:

    String url = "http://your.domain.com/path/to/file.php";
    HttpClient client = new DefaultHttpClient();
    
    try {
      client.execute(new HttpGet(url));
    } catch(IOException e) {
      //do something here
    }
    

提交回复
热议问题