[英]Get base64 encoded png image from url in php
I have picture url from Facebook in jpg format. 我有jpg格式的Facebook图片网址。 But I can manage it in another code only if it is in base64 encoded png format.
但是只有当它采用base64编码的png格式时,我才可以在另一个代码中管理它。 I don't want to rewrite entire module.
我不想重写整个模块。
I have tried everything I found on Internet and nothing works. 我已经尝试过我在互联网上找到的所有内容,但没有任
The closest I solve this is 我最接近解决的是
base64_encode(imagepng(imagecreatefromstring(file_get_contents($url))));
If you have some ideas I would like to hear them. 如果你有一些想法我想听听。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.