PHP code changes to match android changes