vCard Example using class_vcard from Troy Wolf
Author: Troy Wolf (troy@troywolf.com)
Modified Date: 2005-07-14 13:30
The vCard icon above is a link to download my vCard. The vCard format is
recognized by many contact management systems. For example, you can open a
vCard file (.vcf) in Outlook Contacts.
How did I create the vcf file? Well, one way is to simply create your own contact
record in a vCard compatible program such as Outlook and choose to export a vCard file.
However, if you want to programmatically generate vCards from your own website data,
you'll need a way to script the generation of vCards. This is where my vCard class
comes in.
The icon above is a link to a page named vcard_example.php. The source code for
this page is mostly comments--there's really not much to it! The class makes it
easy.
vcard_example.php source
vcard_example.php uses the class_vcard.php class file.
class_vcard.php source
Create your own vCard
I will not save any data you enter in the form below nor will I use it for
any purpose other than to programmatically generate a vCard file that will
only exist in memory while the script creates your vCard--less than 1 second.
This form submits to a script named vcard.php.
vcard.php source
About the author
Troy Wolf operates
ShinySolutions Webhosting,
and is the author of
SnippetEdit--a PHP application
providing browser-based website editing that even non-technical people can
use. Website editing as easy as it gets. Troy has been a professional
Internet and database application developer for over 12 years. He has many
years' experience with ASP, VBScript, PHP, Javascript, DHTML, CSS, SQL, and
XML on Windows and Linux platforms. Check out
Troy's Code Library.