Use PHP to write flag