I am trying to get data from a device which is connected in the local network.
The device listens to 192.168.1.2:10000 For example we can call the function getItems() on the windows computer in the network and we get all the items.
Now I want to do this in my cloud application (php). So I want that example.com/getItems get the items from the device.
I am a noob at networking, so I hope someone can give some advice how to handle this.
at least you need to open your local firewall and expose the Port 10000 and NAT it to you local 192.168.1.2:10000 to the public internet.
If there are no further IPv6 restrictions and you have a static IPv6 address you can reach that it from the cloud php. If you have a typical private internet access, consider to use a dynDNS or similar service to reach you changing IP by a static FQDN.