added channel based output to php frontend.