first attempt at PHP integration...need Ammar to test (most likely something is wrong with it)