Hi, i'm trying to get the base64 string of an image on the server and send it through a socket, but it's failing horribly. It gets a base64 but it isn't correct, I think it's just getting the base64 of a binary dump of the image file.
PHP Code:
temp.img = "base64test.png";
temp.loc = findfiles(temp.img, 1)[0];
temp.lines.loadlines(temp.loc);
temp.lines = base64encode(temp.lines);
temp.lines should be the base64 of the image.