Separated the php stuff from the python script