How to: Use the Viddler API with CodeIgniter
August 4th, 2009 by Colin DevroeThe 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:
- Download the latest copy of PHPViddler.
- Extract PHPViddler into system/libraries/phpviddler/ in your CodeIgniter installation.
- 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';
- 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.
4 Responses to “How to: Use the Viddler API with Code...”
M April 12, 2010 - 11:26 am
Has anyone else run into the “zend_mm_heap corrupted” segfault issue on trying to load php5viddler.php into a CodeIgniter installation? (PHP 5.3.1, Zend extension 220090626, CI 1.7.2) The PHPViddler API is rendered useless, unfortunately.
M May 5, 2010 - 5:21 pm
The culprit is to be the xmlparser.php, which needs to be broken into a library and a helper file in order to play nicely with CI.
Sanket May 26, 2010 - 2:02 pm
Hey man can you guide me through the set up of viddler script for codeigniter???i m getting I/O error and m not getting whats wrong
Colin Devroe October 14, 2010 - 11:35 am
Sanket: For most things you can consult the CodeIgniter documentation for these types of errors. If you think your error is specific to Viddler you can post it in our Developers Group