php base64 decoded image and encrypted image restoration example,
The example in this article describes the implementation method of PHP base64-based decoding of images and encrypted image restoration. Share it with everyone for your reference. The specific implementation method is as follows:
In this example, $data is a base64-encoded image. The specific code is as follows:
Copy code The code is as follows:
//File name: base64.php
$ Data = "/9J/4/4AAQSKZJRGABAAAAAAQABAAD/2WCEABALDA4MCHAODQ4SERATGCGAGAGAGAGDEJJR0OOJM9pdkzoddasfxoqerc4ug1rv19HNPK1XEXBKEFXLZ2M Berisgbuylxoal2NCOEJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY2NJY // AaBeiadiamgMBEQEQH/XAGIAABQE BaqebaqaaaaaaaaaaaaaaaaqidbaugbwgjcgsqaibawmfbqqeaaawawaWaEquququsitfbBBHNRQYGZCCSCSCSCSCSCEVNICOJCHBKBKAJSYNKCKQND U2NZG5OKNERUZHSELKU1RVVLDYWVPJZGVMZ2HPANN0DXZ3EHL6G4SFHOEIYQSK5 SVLPEYMZQIO6SLPQEQAQE4UBRCW8TFXSFIY2DRH4upk5e BN6ONQ8FLZ9PX29/J5+ CTEKFIQ04SXXFXGZGIYNKCKQNTY3ODK6Q0RFRKDISUPTVFVWV1HZWMNKZWZNAG 8TFXSFIYCRS09TV1TFY2DRI4+TL5UFO6ERY8/T19VF4+FR/2GAMAWEAHEDEQA/AJ9Z1G8I1E5SO6MRFBAVXOAQDVL // AJ/J/WDVS0AI2QX/APZ+Z/8AFW 0ARNQ2OF8AP7CF9/DQBE2SAKOL/CF9/DQBC2S6MP8AMIXP/F00Aen27FREMKKKQCFYOA4HXJJW7V8A3 /6CgBdK0q41QS/Z3jXy8Z3kjrn0B9KALsnhS/WNmMtudoJwGbP/AKDQBzrGgCFzQBA5oA9etv8Aj1h/3B/KgDz7xA2Ndu/9/wDoKANrwSS0V+BycJ/7NQBkTaNq0MLyyW7qiKWY7xw B170ATW+j219oEt5aySm6hB3xkgjjk44z06UAQXuk29joEN3cySi7n5jiBAAHXJ4z0/mKAOdc 0wPYbX/j1h/3F/lSA858RtjX7z/f/oKANvwM37nUSOoCfyagDAl1vUZY2jkvJWRgQyluCD2oA 2PCG+zgvdTncpaIm0j++Rzx9On40AJ43geZbXU4XMlq6BR6LnkH8f6UAca7UwPZbX/j1h/3F/l SA8z8TNjxDej/AG/6CmBBYaveaasq2k3liXAf5Qc4zjqPc0AUi9AFqXV7yTTlsGmH2VMEIFUe/ JAyaAE/tu/XTTp/ng2pBGxkU989SM9aQGU70Ae12v8Ax6w/7i/yoA8w8UK//CR3uEYjf2HsKYG lQA9o0LElFJ9xQAvlR/880/75FAB5Uf/PNP++RQAeVH/wA80/75FAB5Uf8AzzT/AL5FMA8qP/ nmn/fIoAcBxSA//9k=";
$img=base64_decode($data);
echo $img;
?>
How to quote pictures:
Copy code The code is as follows:
The operation effect is as shown below:
I hope this article will be helpful to everyone’s PHP programming design.
http://www.bkjia.com/PHPjc/904918.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/904918.htmlTechArticlephp based on base64 decoded image and encrypted image restoration example, this article describes the php based on base64 decoded image and encrypted image restoration implementation method. Share it with everyone for your reference. Specifically...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn