How to convert a php scfript to python?

Does this thread help? Visonic Powermax and Powermaster Component