Posts Tagged ‘development’

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
    $this->load->library('phpviddler/php5viddler');
    $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.

Getting started with phpViddler Part 2: User authentication and sessions

Sunday, April 20th, 2008

If you haven’t already, please be sure to read part one that Kyle put together, which covers the simple task of initiating the phpViddler class and using it to list videos. Some of the code found herein may not make sense if you haven’t read part one.

I think you’ll find, through these tutorials, that using phpViddler makes it dead simple to use Viddler’s APIs. Please leave feedback if you have any specific areas you’d like us to cover.

Authenticating a user

To authenticate a user you will need both the username and password of the user. For this example, we’ll say the username is my username, cdevroe, and the password will be a fake password of ‘password’.

(more…)

Getting Started With phpViddler Part 1: Listing Videos

Sunday, April 20th, 2008

Over the next couple weeks, Colin and I are going to be guiding you through how to use Viddler’s API with phpViddler, the PHP wrapper for our API functions. We’ll be covering everything from embedding videos to registering new users, so keep checking back!

Today, I’ll be covering how to list videos using the Viddler API and phpViddler using the functions videos_listbyuser, videos_listbytag, and videos_listfeatured.
(more…)

Search