How to import iCloud contacts in php

假如想象 提交于 2019-12-05 03:26:53

问题


How to import contacts from iCloud using a iCloud API or any other method which use PHP as server side language. I know there iCloud support cardDav through which we can import iCloud contacts but how? it still a question for me

If any one have an idea it will be very helpful


回答1:


iCloud support cardDAV client/server protocol through which we can make a request to iCloud server and get the saved contacts from iCloud.

To implement cardDAV client/server protocol one need to use third party API and there is very useful and easy to use API available to accomplished this task using Roundcube-CardDAV you can download this library using this link.

To use Roundcube-CardDAV you need to use PEAR.php file.

RoundCube-CardDAV returns contacts in Vcard format so need to parse it also which can be done using Contact_Vcard_Parse class found by here.

You also need iCloud server on which you would make request so it is https://p01-contacts.icloud.com/1603801586/carddavhome/card/ where p01 is server number goes further like p02,p03,p04...p06 etc



来源:https://stackoverflow.com/questions/15111887/how-to-import-icloud-contacts-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!