vCard 规范容许公开交换个人数据交换 (Personal Data Interchange PDI) 信息,在传统纸质商业名片可找到这些信息。规范定义电子名片(或叫vCard)的格式。 vCard 规范可作为各种应用或系统之间的交换格式。定义的格式与传送的方法无关。传送交换可能是文件系统,点对点交换的公共电话网络,以有线网络或无线传送的方式。用户能在互联网上直接利用vCard。电子邮件能转发在vCard中人信息。网页上很多用户填写的表格可自动使用vCard。

vCards with PHP and htaccess

Last updated: May 8, 2007

These tests use spoof vCards, so please don’t try to use them for contacting anyone.
wiki百科对vcard格式规范的详细说明:http://en.wikipedia.org/wiki/VCard

Normal vCard tests

A normal vCard with .vcf file extension (no content-type header)

Does not get parsed as a vCard by some browsers (e.g. Firefox).

Same vCard file with .vcf file extension and htaccess forcing the correct text/x-vcard content-type

If you don’t have access to your php.ini file, this is most useful. Uses the following code in an htaccess file:

	ForceType text/x-vcard

PHP vCard tests

These tests use a line of PHP to send the correct text/x-vcard content-type:

A vCard in PHP with .php file extension

Gets parsed as PHP but doesn’t have the correct file extension. Not ideal.

Same vCard in PHP but with .vcf file extension

Oops! This will not be parsed as PHP!

Same vCard in PHP with .vcf file extension and htaccess forcing application/x-httpd-php

A very round–about way of doing things!