rafael.paulino / youtube
Get data from YouTube
1.0.0
2018-04-19 20:35 UTC
Requires
- php: >=5.6.4
Requires (Dev)
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2025-07-29 01:27:14 UTC
README
Example of use
Install: composer require rafael.paulino/youtube
<?php
require_once 'vendor/autoload.php';
use YouTube\CountChannelSubscribers;
//get api key here https://console.developers.google.com/apis/credentials
$api_key = 'your api key';
//get youtube channel id here: http://johnnythetank.github.io/youtube-channel-name-converter/
$channel_id = 'your channel id';
$subscribers = new CountChannelSubscribers($api_key, $channel_id);
$resultado = $subscribers->getSubscriberCount();
var_dump($resultado);