-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
35 lines (29 loc) · 1.17 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<head>
<title>Hello :)</title>
<meta charset="utf-8"/>
</head>
<body>
<?php
require_once 'YoutubeVideoDataCrawler.class.php';
$video_id = "YOUR_VIDEO_ID";
if (isset($video_id)) {
//create a new object
//give a youtube video id to constructor as parameter
$youtube = new YoutubeVideoDataCrawler($video_id);
//and enjoy
echo "Title:" . $youtube->title() . "<br>";
echo "views:" . $youtube->views() . "<br>";
echo "Publish Date:" . $youtube->publishDate() . "<br>";
echo "Category:" . $youtube->category() . "<br>";
echo "Author:" . $youtube->author() . "<br>";
echo "Duration:" . $youtube->duration() . "<br>";
echo "Description:" . $youtube->description() . "<br>";
echo "Likes:" . $youtube->likesCount() . " and Dislikes:" . $youtube->disLikesCount() . "<br>";
echo "Thumb:".$youtube->thumbnails()[0]."<br>";
echo "Favorite:".$youtube->favoriteCount()."<br>";
echo "Thumb Count:".$youtube->thumbnailsCount();
}
?>
</body>
</html>