Get support for tidal/APE_PHP

If you're new to LTH, please see our FAQ for more information on what it is we do.

Support Options

Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:

View Open Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check out the page and see if there are any options to sponsor this project or it's developers directly.

tidal/APE_PHP

APE_PHP

Lightweight PHP Client Library to Connect to an APE (APE Ajax Push Engine) server. Fully unit tested with PHPUnit.

API

see: http://tidal.github.com/APE_PHP/docs/api/annotated.html

USAGE

This example is meant to be used as a replacement for the PHP code found in the APE_JSF Controller demo.

<?php

$APEhost = 'localhost';
$APEport = 6969;
$APEPassword = 'testpasswd';

$params =  array( 
   'password'  => $APEPassword, 
   'raw'       => 'postmsg', 
   'channel'   => 'testchannel', 
   'data'      => array( 
      'message' => 'Hello APE' 
   ) 
);

if(ApeFileConnection::available()){
   $conCls = 'ApeFileConnection';
}elseif(ApeCurlConnection::available()){
   $conCls = 'ApeCurlConnection';
}else{
   die('No valid Ape-Connection availabe');	
}

$connection = new $conCls($APEhost, $APEport);
$client = new ApeClient($connection);
$request = new ApeRequest('inlinepush', $params);
$response = $client->sendRequest($request);
$res = $response->getResult();
if ($res->data->value == 'ok') {
   echo 'Message sent !<pre>'.print_r($res, 1).'</pre>';}
else {
   echo 'Error sending message, server response is : <pre>'.print_r($res, 1).'</pre>';
}
?>

Other approach using ApeClient as a request gateway

<?php
$connection = new $conCls($APEhost, $APEport);
$client = new ApeClient($connection);
$response = $client->dispatchRequest('inlinepush', $params);
if ($response->getResult()->data->value == 'ok') {
   echo 'Message sent !<pre>'.print_r($response->getResult(), 1).'</pre>';}
else {
   echo 'Error sending message, server response is : <pre>'.print_r($response->getResult(), 1).'</pre>';
}
?>
Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2