2017 © Pedro Peláez
 

library youtube

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

image

madcodez/youtube

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

  • Wednesday, July 25, 2018
  • by madcodez
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

YouTube API v3 PHP Wrapper & YouTube Downloader

A basic PHP wrapper for the Youtube Data API v3 ( Non-OAuth ). Designed to let devs easily fetch public data (Video & Channel) from Youtube. No 3rd party dependancy. The reason of returning the ARRAY response directly is to keep it simple., (*1)

Some parameters are missing in this library, because I don't need them at this point, if you desire a particular feature please file an issue here :smile:, (*2)

Requirements

  • PHP >=5.3
  • CURL extension in PHP

Install

Run the following command in your command line shell in your php project, (*3)

composer require madcodez/youtube

Usage

Example usage of getting "Top of the chart" videos :

<?php

require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$chart = $youtube->chart('10', $pageToken);

print_r($chart);

Example usage of getting Category wise "Top of the chart" videos :

<?php

require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$catVid = $youtube->videoByCat('2', '10', $pageToken);

print_r($catVid);

Example usage of Searching :

<?php
require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$seach = $youtube->search('Web Development', '10', $pageToken);

print_r($search);

Example usage of video info :

<?php

require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$video = $youtube->video('rie-hPVJ7Sw');

print_r($video);

Example usage of getting channel wise video :

<?php

require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$channel = $youtube->channel('UC0gTtCL29NCuex5OApWXpPQ', '10', $pageToken);

print_r($channel);
<?php

require 'vendor/autoload.php';

$youtube = new Madcodez\YouTube\YouTube('* Your API key here *');

$related = $youtube->related('nLzV5l0Enww', '10', $pageToken);

print_r($related);

YouTube API Video Category ID :

2 - Autos & Vehicles, (*4)

1 - Film & Animation, (*5)

10 - Music, (*6)

15 - Pets & Animals, (*7)

17 - Sports, (*8)

18 - Short Movies, (*9)

19 - Travel & Events, (*10)

20 - Gaming, (*11)

21 - Videoblogging, (*12)

22 - People & Blogs, (*13)

23 - Comedy, (*14)

24 - Entertainment, (*15)

25 - News & Politics, (*16)

26 - Howto & Style, (*17)

27 - Education, (*18)

28 - Science & Technology, (*19)

29 - Nonprofits & Activism, (*20)

30 - Movies, (*21)

31 - Anime/Animation, (*22)

32 - Action/Adventure, (*23)

33 - Classics, (*24)

34 - Comedy, (*25)

35 - Documentary, (*26)

36 - Drama, (*27)

37 - Family, (*28)

38 - Foreign, (*29)

39 - Horror, (*30)

40 - Sci-Fi/Fantasy, (*31)

41 - Thriller, (*32)

42 - Shorts, (*33)

43 - Shows, (*34)

44 - Trailers, (*35)

Format of returned data

The returnd data is a PHP Array, (*36)

Youtube Data API v3

Contact

For bugs, complain and suggestions please file an Issue here or send email to madcode.git@gmail.com :smile:, (*37)

License

This library is licensed under the MIT License., (*38)

The Versions

25/07 2018

dev-master

9999999-dev

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *

 

by Rayhan Sardar

api video youtube youtube downloader php youtube downloader

14/07 2018

0.1.4

0.1.4.0

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *

 

by Rayhan Sardar

api video youtube youtube downloader php youtube downloader

13/07 2018

0.1.2

0.1.2.0

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *

 

by Rayhan Sardar

api video youtube youtube downloader php youtube downloader

13/07 2018

0.1.0

0.1.0.0

PHP wrapper for the Youtube Data API v3 & YouTube Downloader

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *

 

by Rayhan Sardar

api video youtube youtube downloader php youtube downloader