PHPackages                             zencoder/zencoder-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zencoder/zencoder-php

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

zencoder/zencoder-php
=====================

Zencoder integration library for PHP

v2.2.4(6y ago)109696.9k↓20.6%43[4 issues](https://github.com/zencoder/zencoder-php/issues)[4 PRs](https://github.com/zencoder/zencoder-php/pulls)5MITPHPPHP &gt;=5.2.0

Since Feb 27Pushed 4y ago57 watchersCompare

[ Source](https://github.com/zencoder/zencoder-php)[ Packagist](https://packagist.org/packages/zencoder/zencoder-php)[ Docs](https://github.com/zencoder/zencoder-php)[ RSS](/packages/zencoder-zencoder-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (9)Used By (5)

Zencoder API PHP Library
========================

[](#zencoder-api-php-library)

Company: [Brightcove/Zencoder](http://www.zencoder.com)

Version: 2.2.4

Date: 2019-09-05

Repository:

HTTP headers are handled in a case-insensitve manner so that they are compatible with HTTP2.

Author: \[Nathan Sutton\] (nsutton (a) brightcove (.) c�om)

Company: [Brightcove/Zencoder](http://www.zencoder.com)

Version: 2.2.3

Date: 2014-07-29

Repository:

To help address problems where users cannot modify php.ini to point cURL to their system CA bundle path, or are using a PHP release before 5.3.7, we have extended this library to allow users to set CURLOPT\_CAPATH and CURLOPT\_CAINFO on the cURL connection used to submit requests.

```
$zencoder = new Services_Zencoder($my_api_key, 'v2', 'https://app.zencoder.com', false, $my_curlopt_capath, $my_curlopt_cainfo);
```

See also the constructor for `Services_Zencoder` for more information on the available arguments.

See [the cURL CA bundle extraction page](http://curl.haxx.se/docs/caextract.html) for information on obtaining a CA bundle. We recommend using the HTTPS link to download the CA bundle.

Author: \[Zac Shenker\] (zshenker (a) brightcove (.) c�om)

Company: [Brightcove/Zencoder](http://www.zencoder.com)

Version: 2.2.0

Date: 2014-07-24

Repository:

The Zencoder CA chain certificate has been removed from the library as the bundled cert will be expiring on July 26 2014, and should not be required as PHP/curl should be able to use the built in CA chain. Please contact us at  with an issues.

Author: \[Michael Christopher\] (mchristopher (a) brightcove (.) c�om)

Company: [Zencoder - Online Video Encoder](http://www.zencoder.com)

Version: 2.1.1

Date: 2012-08-02

Repository:

Parts of this library are based on

For more details on v2 of the Zencoder API visit

For more details on the Zencoder API requirements visit

To start working with the library, create a new instance of the Services\_Zencoder class, passing your API Key as the 1st parameter.

```
$zencoder = new Services_Zencoder('93h630j1dsyshjef620qlkavnmzui3');
```

Once you have created the object, you can use it to interact with the API. For full information, see the Documentation folder, but here is a quick overview of some of the functions that can be called:

```
$zencoder->accounts->create($array);
$zencoder->jobs->create($array);
$zencoder->jobs->progress($job_id);
$zencoder->inputs->details($input_id);
$zencoder->outputs->details($output_id);
$zencoder->notifications->parseIncoming();
```

Any errors will throw a Services\_Zencoder\_Exception. You can call getErrors() on an exception and it will return any errors received from the Zencoder API.

ENCODING JOB
------------

[](#encoding-job)

The ZencoderJob object creates an encoding job using cURL to send JSON formatted parameters to Zencoder's encoding API.

### Step 1

[](#step-1)

Visit the [API builder](https://app.zencoder.com/api_builder) in your account, and execute a successful encoding job.

### Step 2

[](#step-2)

Copy the successful JSON string, starting with the first curly brace "{", and pass it as the parameters for a new ZencoderJob object. Execute the script on your server to test that it works.

#### Example

[](#example)

```
