PHP Classes

YoutubeInfo: Get information about a video in YouTube

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 193 All time: 8,552 This week: 80Up
Version License PHP version Categories
youtubeinfo 1.0.1The PHP License5PHP 5, Web services, Video
Description 

Author

This package can get information about a video in YouTube.

It takes the URL of a given video page in YouTube and gets the contents from the embedding meta data URL for that video so it can return several details about that video.

Currently it return an object with variables that include the following details:

- The video title
- The video author name and page URL on YouTube
- Width and height of the video and the thumbnail image as well the thumbnail URL
- HTML to embed the video in another site pages

Picture of adriano123456
  Performance   Level  
Name: adriano123456 <contact>
Classes: 5 packages by
Country: Brazil Brazil
Age: 36
All time rank: 3516276 in Brazil Brazil
Week rank: 47 Up3 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

Documentation

YoutubeInfo

Implementando

$obj = new YoutubeInfo("https://www.youtube.com/watch?v=VHxjyBtKxpM");

$obj->getThumb()

$obj->getThumb('small')

alt text alt text

print_r($obj->getInfo());
stdClass Object
(
    [author_name     ] => Peter Gundry | Composer
    [thumbnail_width ] => 480
    [width           ] => 480
    [type            ] => video
    [provider_url    ] => https://www.youtube.com/
    [height          ] => 270
    [author_url      ] => https://www.youtube.com/user/23Alchemist23
    [thumbnail_url   ] => https://i.ytimg.com/vi/VHxjyBtKxpM/hqdefault.jpg
    [provider_name   ] => YouTube
    [version         ] => 1.0
    [thumbnail_height] => 360
    [title           ] => Nordic/Viking Music - FoĢ?lkvangr
    [html            ] => <iframe width="480" height="270" src="https://www.youtube.com/embed/VHxjyBtKxpM?feature=oembed" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>
)

Screenshots (1)  
  • print.jpg
  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file README.md Doc. Documentation
Plain text file yt.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 66%
Total:193
This week:0
All time:8,552
This week:80Up