Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-2008, 12:27 AM
Starter Member
 
Posts: 2
Default zimbra contacts in php

Hello,
First of all, i am new to zimbra and i am very interested in what it could mean to me.

I am trying to get my contacts from zimbra in my php website.
I have seen the option to share your contactbook but this way i get a csv with the contacts but without an identifying field. So i was trying to connect using ldap. With ldap you actually don't get the adres book but the GAL. Is there a way to get the adresbook trough ldap?

Next thing i was trying to do is to get information trough SOAP.

Is SOAP the correct way to get the contacts from zimbra?

Thanks for the answers.
Reply With Quote
  #2 (permalink)  
Old 11-14-2008, 12:01 PM
ljm ljm is offline
Project Contributor
 
Posts: 81
Default

A users' addressbook isn't exposed via ldap.

Assuming you want a users's addressbook and not GAL, the options are:
  • use SOAP - if you search for "PHP SOAP" here on the forums you will get a sense of what is involved
  • use the REST API to get the addressbook as a .csv
    This is probably the least work to implement, because it is a simple http GET and then .csv parsing.
__________________
Zindus - contact sync for Thunderbird and Zimbra
Reply With Quote
  #3 (permalink)  
Old 11-17-2008, 05:41 AM
Starter Member
 
Posts: 2
Default

Quote:
Originally Posted by ljm View Post
A users' addressbook isn't exposed via ldap.

Assuming you want a users's addressbook and not GAL, the options are:
  • use SOAP - if you search for "PHP SOAP" here on the forums you will get a sense of what is involved
  • use the REST API to get the addressbook as a .csv
    This is probably the least work to implement, because it is a simple http GET and then .csv parsing.
I don't mean the GAL indeed. i have been looking at these .csv but the first thing i noticed is: you don't get an identifier. If i want to use this list in another system, and the name of a person changes, i can't see it was the same person. I think i have to take a better look al SOAP. Thanks for your answer.
Reply With Quote
  #4 (permalink)  
Old 11-24-2008, 01:39 PM
New Member
 
Posts: 4
Default

Hi,

I would still prefer the REST API. This is much easier than SOAP.
You don't have to use csv as output. Indead within PHP it would be much easier to use either xml or json. With json you can use json_decode and then you have all your contacts in a array. Both formats include IDs that you cab use to identify the entries.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.