Omniata PHP SDK uses the curl_exec method to send events to the Omniata Event API, and request content by calling Omniata Channel API.


Installation and Upgrade

The latest available SDK can be found below:

Platform Links Version Release Date
PHP Source code
API details
1.0.0 6 Feb 2016

To install the Omniata PHP SDK unzip the package to the project folder.

To update to the latest version remove the directory Omniata from your project repository. Replace with the Omniata folder inside of the new package.

There is a example project in the package which is entirely optional to include.

Integrating the Omniata PHP SDK


Once the Omniata PHP SDK has been included in your PHP application, you can start using it. First, you need to include the library in the PHP application.

// Include the two files in the PHP app
require_once(dirname(__FILE__) . "/../Omniata/Client.php");
require_once(dirname(__FILE__) . "/../Omniata/OmniataUrl.php");

Then in the file, initiate the library with declaration of a new Client instance.

$api_key = "<API_KEY>";
$uid = "<UID>";
$org = "<ORG_NAME>";
$client = new Client($api_key, $uid, $org);

Tracking Events

There are no default methods to send events in the PHP SDK. All events are coded individually. To track events, define the parameters in an array.

$eventPara = array(
"om_event_type" => "",
"level" => "level 4",

Requesting Content

To get channel message or content, call the method below with the channel ID.

$channel_id = "40";

This article was last updated on April 21, 2017 15:38. If you didn't find your answer here, search for another article or contact our support to get in touch.