Class constructor.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
Php5tube
Php5tube
(string $video, string $user, string $comment)
-
string
$video: The video object name in the returned array.
-
string
$user: The user object name in the returned array
-
string
$comment: The comment object name in the returned array
Returns a list of the most frequently viewed videos on youtube.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
array
getMostViewed
([int $start_index = 1], [int $max = 25])
-
int
$start_index: Start at the nth most viewed video. The default is to start the number 1 most viewed video.
-
int
$max: The maximum number of videos returned in list. The default is 25 videos.
Returns the account information of a youtube user.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
array
getUserInfo
(string $user)
-
string
$user: - The account name of the youtube user.
Returns all youtube videos that belong to the corresponding user.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
array
getUserVideos
(string $user, [string $category = null], [integer $start_index = 1], [integer $max = 25])
-
string
$user: The account name of the youtube user.
-
string
$category: The category to search.
-
integer
$start_index: The first video id you want to grab. The default is 1.
-
integer
$max: The maximum number of videos returned.
Returns the video comments of a youtube video.
Note: this function does not set the next starting index instance variable in the class.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
array
getVideoComments
(string $id, [int $start_index = 1], [int $max = 25])
-
string
$id: The video's youtube id.
-
int
$start_index: start_index The first entry returned.
-
int
$max: max The number of results returned.
Returns the information of a youtube video.
<?php
include 'Php5tube.php';
$php5tube =
new Php5tube('Video','User','Comment');
?>
array
getVideoInfo
(string $id)
-
string
$id: - The video's youtube id.