I have this java code I used to encode a serialized object that contains a couple of strings in base64
public static String encode(Object obj) throws IOException {
ByteArrayOutputStream b = new ByteArrayOutputStream();
ObjectOutputStream o = new ObjectOutputStream(b);
o.writeObject(obj);
return Base64.encodeToString(b.toByteArray(), Base64.DEFAULT);
}
I store the resultant string in database using PHP ... I know how to decode this in java but for some reasons I need to do it in the PHP code ... so how to do it in PHP ?
base64_decodephp.net/manual/en/function.base64-decode.php