use PHP serialize instead and base 64 encode it to prevent corruption