Reverting to the php solution, I think.