Is it reasonable to use php like this?

Source: Internet
Author: User
Is it reasonable to use php like this? hello everyone, I am working on a project to collect traffic. after collecting the information, I need to send it to our server through wifi for processing. On the server side, there is a web server for users to query related information through a browser. The problem is that I can directly use php on the web server to establish a socket connection with wifi and then receive information from wifi, or I need to write another application server on the server to communicate with wifi and then share the database with the web server to share data. What kind of thinking do you think is better? Or are there any problems ??


Reply to discussion (solution)

Check the instruction documents and provide the transmission protocols supported by your Wi-Fi device.

Not done

Check the instruction documents and provide the transmission protocols supported by your Wi-Fi device.

Do you think I can write a server dedicated for communication? (in fact, I am also preparing to use this server to complete other additional functions, if php is used to implement all things, the overhead will be too high)

Check the instruction documents and provide the transmission protocols supported by your Wi-Fi device.

My wifi module supports the tcp and http protocols, and can use the socket mechanism for communication.

Check the instruction documents and provide the transmission protocols supported by your Wi-Fi device.
Grace, it's good to know how to do it ~~

So how does he use the http protocol? Should there be examples?

So how does he use the http protocol? Should there be examples?

I feel that the first solution is not good. if the load is too high, I should write a software to complete the communication and other functions. just access the web server with peace of mind.

Why is it not that wifi is submitted to the web, but that the web uses socket to connect to wifi.

Why is it not that wifi is submitted to the web, but that the web uses socket to connect to wifi.

Because my side involves two-way communication, the web needs to regularly send data to wifi and listen for wifi data in real time.

Reference reply on the eighth floor:

Why is it not that wifi is submitted to the web, but that the web uses socket to connect to wifi.


Because my side involves two-way communication, the web needs to regularly send data to wifi and listen for wifi data in real time.

In real time, do not link to the web. directly write data to the C server.

I have a lot of feelings when I saw this post again. I spent a year learning too many things. now I have finished writing about the linux server and learned a lot.

[Quote = reference reply on the 9th floor:]

Reference reply on the eighth floor:

Why is it not that wifi is submitted to the web, but that the web uses socket to connect to wifi.


Because my side involves two-way communication, the web needs to regularly send data to wifi and listen for wifi data in real time.
In real time, do not link to the web. directly write data to the C server.

I have a lot of feelings when I saw this post again. I spent a year learning too many things. now I have finished writing about the linux server and learned a lot.

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.