server re-written in php