开发者

how to use base64binary in php

开发者 https://www.devze.com 2023-01-01 09:32 出处:网络
I have accessed the following http://www.webservicex.net/genericbarcode.asmx luckly i got the result too,but the result in the format of base64binary.

I have accessed the following http://www.webservicex.net/genericbarcode.asmx

luckly i got the result too,but the result in the format of base64binary.

i dont know how to parse the result if any one knows and Please explain me how to use the base64binary开发者_StackOverflow and convert the encoded format into the image.

Thanks,

Praveen J


base64_decode is the function you need. See base64_decode() doc page.


You could use base64_decode():

base64_decode($result);


Use the base64_decode function. an example is here http://dean.edwards.name/weblog/2005/06/base64-ie/


<?php
$data = <<<IMG
.... add your image base64 here.....
IMG;
header('Content-Type: image/jpeg');
print base64_decode(trim($data));
?>
0

精彩评论

暂无评论...
验证码 换一张
取 消