![]() |
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:
|
You will want to base64 encode the raw data of the image. loadlines() will load all lines into an array and should only be used with plain text files and formats. Try loadstring()?
|
It works with loadstring! Thankyou!
|
I'm somewhat curious about what you stand to gain from transferring the image as base64; all you will do is make the image significantly bigger to transfer than it originally was?
|
Quote:
|
Jatz and I are making a system similar to player cards for Delteria, we're sending the image of the player through a socket and letting a php script generate an image from it.
|
Quote:
There's also server-side drawing panels that you can use as well. |
Quote:
|
How do you use a drawing panel serverside? iv'e used it clientside before for era valentines day cards. Is it the same logic?
|
Quote:
|
Iv'e tried not encoding it, but the php server fails to put it back together.
|
| All times are GMT +2. The time now is 05:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.