Re: vCard Image
| From: | Matijn Woudt | Date: | Thu, 12 Jul 2012 22:34:00 +0000 |
| Subject: | Re: vCard Image | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318460@lists.php.net to get a copy of this message | ||
On Thu, Jul 12, 2012 at 5:51 PM, Floyd Resler <fresler@adex-intl.com> wrote:
> I'm trying to extract the image from a vCard and display it. I'm not having any
> luck. I saw a sample of putting an image into a vCard via PHP and use base64_encode. So I thought
> base64_decode would work. However, still no luck. Anyone have any ideas?
>
> Thanks!
> Floyd
>
Hi Floyd,
If I'm not mistaken, vCard is a text based file format. You can open
it in any text editor. You'll see some stuff which just makes sense as
plain text. Images can be embedded inside the file, which is then
indeed in base64, but you'll need to find the start and ending of the
base64 block and only decode that. Keep in mind that images can also
be referred to by URL, in which case you can just download them.
I imagine you can easily find the vCard file format on Google..
- Matijn