LCCS and PHP with ZendAMF

Adobe LiveCycle Collaboration Service has in its SDK examples for integration with the main languages used in web programming like PHP, Java, Python, etc.
In the Adobe documentation, it is recommended to use AMFPHP or pure PHP, but this integration can be used seamlessly together with ZendFramework (using ZendAMF)
Ryan Stewart wrote two articles that show how this implementation with PHP and REST.

A note on the article by Ryan, in Flex 4, Adobe introduced the use of swfobject, then the mode of getting the URL and pass parameters to the SWF looks like this:
var xiSwfUrlStr = “playerProductInstall.swf”;
var flashvars = {};
flashvars.roomURL = swfobject.getQueryParamValue(“roomURL”);
flashvars.authToken = swfobject.getQueryParamValue(“authToken”);
var params = {};
In LCCS sdk, there is a file called lccs.php, just copy it to the same directory of your class zend. Then add the include in your gateway.php
< ?php require_once 'Zend/Amf/Server.php'; require_once 'lccs.php'; require_once 'Test.php'; /** Bootstrap */ // Instantiate server $server = new Zend_Amf_Server(); $server->setProduction(false);
// Handle request
And this is a simple test class to call the method that returns the token for authentication
< ?php class Test { private $account; private $room; private $devUsername; private $devPassword; private $secret; //$accountURL = "$account"; private $accountURL; private $roomURL; function __construct() { //for LCCS $this->account = “Your SDK account username from LCCS developer portal”;
$this->room = “The room you want to connect to”;
$this->devUsername = “Your LCCS developer account username”;
$this->devPassword = “Your LCCS developer account password”;
$this->secret = “The shared secret from the LCCS developer portal”;

//$accountURL = “$account”;
$this->accountURL = “$this->account”;
$this->roomURL = “$this->accountURL/$this->room”;

public function getToken($data=array())
$this->account = new RTCAccount($this->accountURL);
$session = $this->account->getSession($data[‘room’]);
$displayName = $data[‘displayName’];
$username = $data[‘username’];
$role = $data[‘role’];
$token = $session->getAuthenticationToken($this->secret, $displayName, $username, $role);
return $token;
catch (Exception $e)
throw new Exception($e->getMessage());

Was this article helpful? feel free to make a donation and help keep the blog in the air
Adobe, LCCS, PHP, ZendAMF , ,


  1. Antonio

    I am trying to do the Ryan example but dont understand the javascript suggestion for replacing “application” in context. Can you show a completed .mxml?


  2. Antonio

    I have tried ryans samples and this addition but still don’t get it, should I be getting a visible token back from LCCS on the second page of the html?
    thanks. All I want is to set up a simple verification of users for external verification and then launch a flash based chat session with another flash based user. thanks

  3. I used the following way: the swf requests the token by using the RemoteObject (calling ZendAMF) and step to the next step is authentication in LCCS giving permissions. All on the same screen

Leave a Reply