Get Status Of a Zebra Printer


I would need to know how to get the status of the zebra printer in PHP if possible. Is there any way? or in another programming language? I connect to the printer through the Ip and port and I can print OK, but I need to know the status of it either by sending some command but I do not know how to get the answer.

Thank you!