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 05-27-2010, 05:26 PM
Junior Member
 
Posts: 7
Default zimbra PHP-SOAP API (with GET Params)

I've made a simple API to controll zimbra with for PHP or even GET params. It isn't full ready or tested yet, but the main tasks works fine now. Maybe the one or other want to extend, test or improve it (or translate it, currently its written and commented in German...)

theres also no authentification now (e.g. md5), only an restriction for local Ip's.

so long, have fun

Günther

p.s.: you shouldn't forget .htaccess
Attached Files
File Type: zip zimbraPHPSOAP.zip (110.4 KB, 54 views)
Reply With Quote
  #2 (permalink)  
Old 06-01-2010, 04:39 AM
Partner (VAR/HSP)
 
Posts: 92
Default excellent

Excellent work. How does this relate to the PHP class in the sticky?

@Moderators: Perhaps make this a sticky as well?

@Zimbra: Considering the amount of work and discussions concerning PHP/Perl/Other classes for zimbra SOAP/REST communication, perhaps it would be a good idea to collect those in a wiki, documenting the differences, improvements, problems, etc. If that hasn't been done already.

Delivering a complete SDK with these classes would be even better of course. This would greatly reduce the learning curve for new developers.
__________________
Snelbij | Uw informatie ter beschikking.
https://www.snelbij.nl
Reply With Quote
  #3 (permalink)  
Old 06-01-2010, 05:07 AM
Zimbra Consultant & Moderator
 
Posts: 20,316
Default

Quote:
Originally Posted by stiller View Post
Excellent work. How does this relate to the PHP class in the sticky?

@Moderators: Perhaps make this a sticky as well?
It should go in the wiki, it's a Community resource and is available to anyone to add their information to it.
__________________
Regards


Bill
Reply With Quote
  #4 (permalink)  
Old 06-01-2010, 01:52 PM
Junior Member
 
Posts: 7
Default

yep, the documentation has to be done, unfortunately i've no time at the moment... a documentation is written once, but read oft-times...

a short introduction can I give you now:

$zimbraction=new zimbraaction(); (also not named in convention, as i see now... ) is the controller for the actions, coded in the GET-cmd string. In his constructor, it makes an instance of ZimbraSoap API $this->z=new zimbraSoapApi().

The controller has this main functions:

$zimbraction->dofixedarglength($cmd, $cmdarray);
$zimbraction->dovararglength($cmd, $cmdarray);

for admin controlls (admin get logged in), segmented for defined params, and dynamical params (afterward i see, it's not well structured! there is much to rework!)

$zimbraction->douserfixargs($cmd, $cmdarray);
for actions, which the user must do (e.g. search folder or something). the user get preAuth.

$zimbraction->getnewmails($cmd, $cmdarray);$zimbraction->cal($cmd, $cmdarray); $zimbraction->newmsg($cmd, $cmdarray);
=> user functions, which aren't ready now, but working fine. they must be adjust and extend for useful working.

zimbraSoapApi:

divided into 3 main parts: admin, user and upload actions. The user/admin get automatically logged on; it uses the cached auth-tokens and times. If they are out of time or incorrect, they get renewed. The pear XML-serializer makes an array out of the xml response.

Upload is developed with curl. An image with web-url get uploaded into a local directory.

hope, you could help me to make it much more usable!

regards

gunthor
Reply With Quote
  #5 (permalink)  
Old 07-07-2010, 07:46 AM
Junior Member
 
Posts: 7
Default Update

Hi,

i tried to structure the SOAP Kit and modulize it, so that it can be extended easily.
It's quite easier as before, and no there is also a Shell-feature, where zmpov commands (or all other linux commands) can be used.

I also began to documentate the whole thing in english.

Not ready yet, but maybe you can give me feedback or improve/add some sections. At the moment I try to improve the error handling and logging classes....

It would be great, if you'll get part of this project!

gunthor's zimbraControl at gunthor - GitHub

so long, enjoy life


Günther
Attached Files
File Type: zip zimbraControl.1.0.0.zip (839.3 KB, 46 views)

Last edited by gunthor; 07-07-2010 at 05:09 PM..
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.