View Single Post
  #1  
Old 03-16-2013, 02:40 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Getting the base64 of an image

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.img1)[0];
  
temp.lines.loadlines(temp.loc);
  
temp.lines base64encode(temp.lines); 
temp.lines should be the base64 of the image.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote