Skip to content
The PHP wrapper for Viddler's API
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


phpViddler API Library

A PHP Wrapper class for Viddler’s REST Interface. Wraps each method into their own functions and includes an open source XML Parser.

For more information, visit our developer site


We highly recommend upgrading your application to use PHPViddler 2. We're offering this transitional version only to help you move from version 1 of our API to version 2 as painlessly as possible. However, this version will no longer be supported and only version 2 of PHP Viddler and our API will be supported in the future.

Installation Instructions

phpViddler is meant to be installed into most any PHP-powered web site or application.

  1. Download the most recent version.
  2. Upload phpviddler.php and xmlparser.php to your server.
  3. Include phpviddler.php in your web site or application.
  4. Initiate Viddler class $v = new Phpviddler();
  5. Setup API Key variable $v->apikey=KEY_HERE


$v = new Phpviddler('your api key');

// Find videos by user
$videos = $v->videos_listbyuser('kyleslat');
foreach($videos['video_list']['video'] as $video) {
  echo $v->video_getEmbed($video['id']);

Included in PHPviddler is an /examples/ directory with a few code examples.

For more tutorials check the Viddler Development Blog


phpViddler is dual-licensed under the MIT and GPL licenses. The details of these licenses are included with the zip file.

Third-party software included

At present we include the XML Library as a means to parse the REST API’s responses, though it is configurable to turn off for applications that already have an XML Parser. See readme for details.


Included is a class Php5viddler which will raise exceptions (supported in PHP 5) if an error is returned from the API. If you use Phpviddler, you need to check the response to see if there is an error node.

Something went wrong with that request. Please try again.