binary - PHP: How to convert an image from URL to Base64? -


i want convert image url base64.

do want create data url? need mime-type , other additional information (see wikipedia). if not case, simple base64 representation of image:

$b64image = base64_encode(file_get_contents('path/to/image.png')); 

relevant docs: base64_encode()-function, file_get_contents()-function.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -