Every repository with this icon (
Every repository with this icon (
tree c5dcf2b4f7b8a22c1493acf8a1e9877cc6009649
parent ef67c255e66a4eb52b8e946d6745b92045fb7f86
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Sun Dec 21 11:53:24 -0800 2008 | |
| |
php5viddler.php | ||
| |
phpviddler.php | ||
| |
xmlparser.php | Tue Jan 06 09:10:34 -0800 2009 |
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
Installation Instructions
phpViddler is meant to be installed into most any PHP-powered web site or application.
- Download the most recent version.
- Upload phpviddler.php and xmlparser.php to your server.
- Include phpviddler.php in your web site or application.
- Initiate Viddler class $v = new Phpviddler();
- Setup API Key variable $v->apikey=KEY_HERE
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
- XML Library by Keith Devens, version 1.2b (optional)
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.
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']);
}
For more tutorials check the Viddler Development Blog








