changed to php

added includes, etc