开发者

How to run a server side php file in J2ME

开发者 https://www.devze.com 2023-03-17 02:12 出处:网络
I am developing a server-client application with using J2ME. There I need the client program to access the server and view data. For doing this, I made an HTTP connection with the server. Now I want t

I am developing a server-client application with using J2ME. There I need the client program to access the server and view data. For doing this, I made an HTTP connection with the server. Now I want to run a php file which is located in server and doing the needful. But I couldn't able to find a way to run the server php file using my client app. Please a开发者_JS百科nyone can help on this ?


If I understand you right the solution is as follows:

  1. Implement a php-script that gets POST or GET request and save it in a file. For instance: "yourscript.php". This script does what is necessary and generates the output, let say in plain text format.
  2. Implement a J2ME functionality that opens HTTPConnection and makes POST or GET request to http://www.yourserver.com/yourscript.php (according to your php-script expectations) and reads the server response.

That's it.

0

精彩评论

暂无评论...
验证码 换一张
取 消