Archive for August, 2009

How to: Use the Viddler API with CodeIgniter

Tuesday, August 4th, 2009

The Viddler team is using CodeIgniter more and more for our internal PHP projects. Obviously we need to use CodeIgniter with the Viddler API quite a bit so we figured we’d share with you how easy it is to include PHPViddler, the open source PHP API wrapper class for the Viddler API, in your CodeIgniter application.

Here are the steps to follow:

  1. Download the latest copy of PHPViddler.
  2. Extract PHPViddler into system/libraries/phpviddler/ in your CodeIgniter installation.
  3. Load the PHPViddler library (as needed) like this:
    // Load PHP Viddler and setup
    $viddler = $this->php5viddler;
    $viddler->apiKey = 'your_api_key_here';
  4. Use $viddler->function_name() after that.

I’ve just set up a local CodeIgniter installation and had multi-file uploading working within about 30 minutes using PHP Viddler with PHPViddlerUploadify (an extension of both PHPViddler and the JavaScript framework jQuery) for easy file uploading.

We hope that you enjoy using PHPViddler with CodeIgniter as much as we do.



Keep up-to-date with announcements and updates to the Viddler platform.