first cut php conversion working. Posted message in FB group