导出和导入 Vcard

发布于 11-28 10:37 字数 298 浏览 1 评论 0原文

我想允许用户将他们的联系人(电子邮件)导入到我的 php 应用程序中。我正在考虑 vcard 格式,因为大多数手机都允许 vcard 导出。现在我有一些疑问

  1. iphone、android、blackberry、symbian 是否允许导出为 vcard,并且 vcard 格式是否相同。

  2. 您还可以以相同的格式导出 Gmail 联系人 vcard 也是如此

  3. 您可以将 Apple 邮件、outlook、thunderbird 联系人导出为 vcard

    p>

I want to allow users to import their contact(email) into my php application. I am considering vcard format as most mobile phones allow vcard export. Now i have a few doubt

  1. Do iphone, android, blackberry, symbian allow export as vcard and is the vcard format same by all.

  2. Also u can export Gmail contacts vcard is that too in same format

  3. Can u export apple mail, outlook, thunderbird contacts as vcard

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

栀梦2024-12-05 10:37:28

我认为,如果他们遵守标准(不能确定是否足够幸运拥有所有这些设备),那么是的,他们应该出口相同的标准。

来自 http://en.wikipedia.org/wiki/VCard

以下是一个示例包含一个人信息的 VCard 文件:

vCard 2.1:

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD

vCard 3.0:

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD

vCard 标准 2.1 版受到电子邮件客户端的广泛支持。 vCard 格式 3.0 版是包含在 RFC 2425 中的 IETF 标准跟踪提案RFC第2426章

I would think that if they abide with the standard (Cant be sure as not lucky enough to own all those devices) then yes they should export the same.

From http://en.wikipedia.org/wiki/VCard

The following is an example of a VCard file containing information for one person:

vCard 2.1:

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD

vCard 3.0:

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD

Version 2.1 of the vCard standard is widely supported by e-mail clients. Version 3.0 of the vCard format is an IETF standards-track proposal contained in RFC 2425 and RFC 2426.

如日中天2024-12-05 10:37:28

iOS 提供了用于访问移动 Safari 中的联系人数据库的任何机制。批量导出联系人的唯一方法是通过本机应用程序。

从 iOS 一次导出联系人的一种非常方式是通过电子邮件。 iOS 允许用户相当轻松地以电子邮件附件的形式发送 .vcard 文件。

工作流程可以这样进行:

  1. 让用户选择通过电子邮件导出联系人
  2. 为服务器上的用户生成唯一的电子邮件地址。
    类似于 flickr 的电子邮件地址的帖子
    和其他人提供的东西,类似于
    contacts-export+[unique string]@exmple.com
  3. 指示用户将所述电子邮件地址添加到 iOS 联系人数据库
    点击并按住电子邮件地址 -> 创建新联系人
  4. 指示用户打开联系人应用程序,找到他们想要导出的联系人以及每个联系人
    选择共享联系人 -> 电子邮件 ->发送到之前保存的电子邮件地址
  5. 创建一个 cron 作业来定期检查和处理这些传入消息

对于最终用户和您(开发人员)来说,这一切似乎都是一项繁重的工作。话虽这么说,如果您的用户足够精明,能够处理复杂的工作流程,那么它肯定比一次性导出联系人的复制/粘贴要方便得多,特别是对于具有不止一两个关联字段的任何联系人。

我不确定 Android、Blackberry 等在导出方面支持什么。

iOS provide any mechanisms for accessing the contacts database within mobile Safari. The only way to export contacts en mass would be through a native app.

A very kludgey way to export contacts one at time from iOS would be by email. iOS lets a user fairly easily send a .vcard file as an email attachment.

A workflow could go about like this:

  1. Have the user opt-in for contact exporting by email
  2. Generate a unique email address for a user on your server.
    Something similar to the post by email addresses that flickr
    and others provide, something along the lines of
    contacts-export+[unique string]@exmple.com
  3. Instruct user to add said email address to the iOS contacts database
    (tap & hold on email address -> Create New Contact)
  4. Instruct user to open the Contacts app find the contact(s) they wish to export and for each contact
    select Share Contact -> Email -> send to the previously saved email address
  5. Create a cron job to periodically check and process these incoming messages

This all seems like a lot of work for both the end user and you, the developer. That being said if your users are savvy enough to handle that convoluted workflow, it would certainly be much handier than copy/pasting for one off contact exporting, particularly for any contact that has more than just one or two associated fields.

I'm not sure what Android, Blackberry, et al support in terms of exporting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文