Hi
I am newbie to PHP, I am touching it as a possible solution.
I have a device at home which measures electricity consumption, it is connected to my router and also sends data using UDP to target IP and port I can specify port 9999 in my case.
The data is in fixed length and structure packets, as plain text.
I want to capture the data and later process it.
I have Apache server on my machine at home, I can send the data to my PC and see it coming through using Netcat.
But using PHP fails, and the page hung.
I just copied example from PHP documentation and it supposed to be straight forward.
Anyone can help?
The link is for the short script I used.
If it's easy I can send the data to another IP and port for someone to debug.
I think this commands is the problem socket_recvfrom
When I set Netcat to listen and use netstat -lpn |grep :9999 I see nothing but packets are coming through
When I use PHP code as in the example I see a process listening on the port, so the behavior of Netcat and the code is different.
I reached the limits of my knowledge ")
Roni