Poll pins and GET/POST data to php/MySQL

I have a Zigbee Connectport (ethernet) that works with Device Cloud, but I want to upload the data to my server using a GET request (or POST). I am running PHP and MySQL.

The actual request should be pretty straightforward. What I am having trouble with is the how to read the data from the Xbee into the python program. I will need to read the pin states on a remote XBee as well as read serial data from a microprocressor over an XBee connection and send that to the datatbase.

I can’t find any examples of this being done. I did find digihw, but cannot tell how to manage a gateway with several modules, and the documentation says that GPIO commands don’t work on most devices.

In digiESP you have number of sample apps. try “Xbee LT sensor”.
Another example show how to reed data from Xbee based smartplug sensors among other things.

another one

This should help deciding what function to use with what pin:

another link worse mentioning: