The HW Blog

Want to be updated? @opencoconut | Feed

Introducing a New PHP Library

June 13, 2013 Features

We have just released a brand new PHP library which is much simpler and flexible to use than the previous one. We also uploaded the lib to so it's super easy to install.


If you don't have composer yet:

curl -sS | php

Edit the composer.json file:

    "require": {
        "coconut/coconut": "1.*"

Now install all the depencies by executing composer:

php composer.phar install

Getting Started

// auto load the dependencies
require_once "vendor/autoload.php";

// login with your Coconut API key
$hw = new Coconut("HW-API-Key", $api_key);

$hw->create("hls/job", array(
  "video_id" => 1234,
  "format_ids" => "HLS_416x234_110K, HLS_416x234_200K, HLS_360p_600K, HLS_360p_1000K, HLS_720p_1500K",
  "ping_url" => "",
  "output_url" => "s3://key:skey@bucket/path/hls/"

For more usage example, have a look at the PHP library page.

Any Comment? Contact us via our contact page