churnbee/php-lib

A PHP 5.3 library for sending events to the churnbee.com service.

Installs: 40

Dependents: 0

Stars: 1

Watchers: 1

Language: PHP

1.0.2 2013-11-24 12:59 UTC

README

ChurnBee php API integration library. Visit official page for more information

Requirements

This module has no external dependencies.

Installing with Composer

Define Your Dependencies

We recommend installing this package with Composer. Add the following dependencies to your projects composer.json file:

    "require": {
        "churnbee/php-lib": "dev-master"
    }

Then, on the command line:

curl -s http://getcomposer.org/installer | php
php composer.phar install

Use the generated vendor/autoload.php file to autoload the library classes.

Installing without Composer

Place the ChurnBee files in the include_path as specified in your php.ini file or place it in the same directory as your PHP scripts. Alternatively include all files:

require_once("ChurnBee/Library/CBConf.php");
require_once("ChurnBee/Library/ChurnBeeException.php");
require_once("ChurnBee/Library/CurlUtil.php");
require_once("ChurnBee/Library/ChurnBee.php");

Basic Usage Example

Full event list and their arguments can be found here

<?php
require_once 'vendor/autoload.php';
$options = array("accessToken"=>"change_me");

$cb = new ChurnBee\Library\ChurnBee($options);

// Send registration event
$cb->register("MyUserId","MyPlan");