Defvayne23

 

jTube – Not Just for Javascript

My jQuery YouTube API plugin, jTube, has now been ported to a PHP class. The two work similar in the fact that you set a query type (user uploads, feed, playlist, etc.) and set some options. Below is an example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
include("jTube.Query.php");
 
$oVideos = new jTubeQuery;
$oVideos->setQuery("user", "defvayne23", "uploads");
$oVideos->setOption("limit", 5);
 
try {
	$aVideos = $oVideos->runQuery();
} catch(Exception $e) {
	die($e->getMessage());
}
 
// Use $aVideos

With the PHP class jTube can now make use of authentication and with that the entire YouTube API. The YouTube API allows for anything from uploading a video to supplying feedback on a video (rate, comment, flag). The PHP class already can make use of authentication tokens to retrieve private info for the user that belongs to the token. The first new functionality coming to the PHP class is video managing and upload.

Checkout jTube for PHP on github now.

  • Share/Bookmark

 

View Comments to “jTube – Not Just for Javascript”

  1. [...] This post was mentioned on Twitter by James Fleeting, John Hoover. John Hoover said: jTube – Not Just for Javascript http://goo.gl/fb/h5hDb [...]

Leave a Reply

blog comments powered by Disqus