Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The PHP wrapper for Viddler's API

tag: v1transition

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 README.markdown
Octocat-spinner-32 php5viddler.php
Octocat-spinner-32 phpviddler.php
Octocat-spinner-32 xmlparser.php
README.markdown

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

URGENT!

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

Usage

$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

Licensing

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.

PHP 5

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.