Ok like a plonker I thought it would be easy as.
We have a popup with clients details in, to look like a vCard ( but heavily styled ) all propagated via our db on the fly.
So I just thought yeah no worries, we can use php within the vcard, and parse the relevant info .. so that wneh user clicks d/l link they get the correct vCard details..
Hmmm nope, and finding info about vCards etc is hard.
So here is a snippet of the vcard.vcf
BEGIN:VCARD
VERSION:2.1
N;LANGUAGE=en-in:Name;Type;Your
FN:Type Your Name
TEL;WORK;VOICE:+1 (800) 123 4567
Example TEL is rendered in our php like: <?=$r['tel'];?>
So how do we get php within the vcard to make it useable.. any hints appreciated.
The following is an example of a VCard file containing information for one person:
vCard 2.1:
vCard 3.0:
Once you have all your data in a formant you can use say a string variable :
You can also if you wish create the file and off a link to that:
I hope this puts you on track and that I have understood your question correctly.
ANSWER:
The above code will allow the user to to download the vCard held in $vCard. In your case you would need to add your own data an example of how this would go is shown below: