A long-troubled question, ask the master to point the way

Source: Internet
Author: User
A long-troubled question, ask the master to point the way.
An end device that sends a request to the server
For example:
192.168.1.9:8000/response?serial=235678979
Requires the response data to be
aaa=333
bbb=444
Realtime=1

When responding with an application, it is normal and can be used.


Use PHP programmer, the response part of a bit more things, according to the terminal equipment can not be used properly!


With the Wireshark grab packet, some more PHP header information, how to remove these redundant headers.


Note, the device is also normal when the direct response is changed. It is not normal for PHP to handle it.


------Solution--------------------
These are standard HTTP interactions that are required for header data. If you want to do it in PHP,
1, modified Apache and PHP do not output header data (specific Baidu, Google)
2, modify the terminal code, according to the HTTP 1.1 protocol to come out data.
------Solution--------------------
Write to the terminal with a file function, there is no HTTP header
The key is how to know which terminal
------Solution--------------------
HTTP header is the Web server is responsible for returning, do you want the Web server to receive HTTP requests do not return HTTP headers? I'm afraid I can't, why don't you use PHP as a socket server.
------Solution--------------------
Agree upstairs Silly Bird fly first
This is a Web server thing, in fact, your response needs not the HTTP protocol, that is, you have to write a headless server ....
  • 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.