I´m using an array, which I encode into json, than into BASE64, save it on a Cookie, to be later on retrieved. The actual string is:
{"insert":0,"delete":0}
In PHP I have:
$Sync = json_encode($update);
setcookie('Sync',strtr(base64_encode($Sync), '+/', '-_'), 0, "/");
The Cookie is being stored as:
eyJpbnNlcnQiOjEsImRlbGV0ZSI6MH0%3D
That final "%3D" should be "=" so to fill the rest of the base64, nad therefore return strange characters, but I can´t get it right. Any ideas? Thanks in advance