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 , ,


Leave a Reply