导出和导入Vcard [英] Exporting and importing Vcard

查看:324
本文介绍了导出和导入Vcard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想允许用户将他们的联系人(电子邮件)导入到我的php应用程序中。我正在考虑vcard格式,因为大多数手机都允许vcard导出。现在我有几点疑问了,iphone,android,blackberry,symbian允许导出为vcard并且是vcard格式所有。

  • 另外你可以导出Gmail联系人vcard的格式也一样

  • >你可以将苹果邮件,outlook,thunderbird联系人导出为vcard 我会认为,如果他们遵守标准(无论如何不幸拥有所有这些设备),那么是的,他们应该出口相同的。



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



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

      vCard 2.1:

    BEGIN:VCARD
    版本:2.1
    N:Gump; Forrest
    FN:Forrest Gump
    ORG:Bubba Gump虾公司
    TITLE:虾男子
    电话;工作;声音:(111)555-1212
    电话;家庭;声音:(404)5 55-1212
    ADR; WORK:;; 100 Waters Edge; Baytown; LA; 30314;美利坚合众国
    标签;工作;编码=引文出版物:100 Waters Edge = 0D = 0ABaytown,LA 30314 = 0D = 0澳大利亚美国
    ADR; HOME:;; 42 Plantation St.; Baytown; LA; 30314;美国
    LABEL; HOME;编码=报价单:42 Plantation St 。= 0D = 0ABaytown,LA 30314 = 0D = 0AUnited美国
    EMAIL; PREF; INTERNET:forrestgump@example.com
    REV:20080424T195243Z
    结束:VCARD

    vCard 3.0:

    BEGIN:VCARD
    版本:3.0
    N:Gump; Forrest
    FN:Forrest Gump
    ORG:Bubba Gump虾。
    TITLE:虾人
    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\\\
    Baytown,LA 30314\\\
    美国美国
    ADR; TYPE = HOME:;; 42 Plantation St.; Bayto wn; LA; 30314;美利坚合众国
    LABEL; TYPE = HOME:42 Plantation St. \ nBaytown,LA 30314 \\\
    美国美元
    电子邮件;类型= PREF,互联网:forrestgump @ example.com
    REV:20080424T195243Z
    END:VCARD

    电子邮件客户端广泛支持vCard标准。 vCard格式的3.0版是一个IETF标准跟踪提案,包含在 RFC 2425 RFC 2426


    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

    解决方案

    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:forrestgump@example.com
    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:forrestgump@example.com
    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.

    这篇关于导出和导入Vcard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆