On the server side of php, the client uses the android mobile phone for communication

Source: Internet
Author: User
On the server side of php, the client sends a string of numbers to the server side using the android mobile phone. after the server side verifies, the return value is returned to the client, how does the server implement this function in the background? ------ Solution ------------------ the server is listening to port 80 such as apache or nginx on the server side. the mobile phone uses the http & nb php server side, and the client uses the android mobile phone for communication problems.
The mobile phone sends a string of numbers to the server, and the return value is sent to the client after Server Verification. how does the server implement this function in the background?


------ Solution --------------------
The server is listening to port 80 through apache or nginx, and the mobile phone interacts with the server through http request and response.
------ Solution --------------------
Reference:
Reference: reference: a php file.
The client requests this http address
How to debug it? That is, how to establish a connection between a mobile phone and a computer?

After the php file is written
The mobile client simulates the post or get request to obtain the returned content from the http address.
How to receive jso sent by android in php ......


The transmitted data is in json format.
Submit or use post or get

Example:
GET request interface
Api. php? JsonValue = {"name": "ayzen", "age": "25 "}

Your php will handle it.
$ Array = json_decode ($ _ GET ['jsonvalue']);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.