Download the PHP package gbuckingham89/youtube-rss-parser without Composer

On this page you can find all versions of the php package gbuckingham89/youtube-rss-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package youtube-rss-parser

gbuckingham89/youtube-rss-parser

A simple PHP parser for reading a YouTube RSS feed. It provides a object oriented interface for accessing the RSS feed data. Perfect for when you need to access recent videos, but don't want to use the full YouTube API.

Requirements

Requires PHP 7.1.8 or greater. Uses guzzlehttp/guzzle as a HTTP client and nesbot/carbon for handling dates. See composer.json for more details.

If you require support for an older PHP version (>=5.5), see release v0.1.0.

Installation

Use Composer:

composer require gbuckingham89/youtube-rss-parser

Usage

To get started you'll need to create an instance of the parser;

$parser = new \Gbuckingham89\YouTubeRSSParser\Parser();

You can then load the RSS feed from a URL:

$rss_url = 'https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_ID_HERE';
$parser->loadUrl($rss_url);

Or, if you're in a hurry, you can also pass in the URL as the first argument when you instantiate the parser object.

Or if you've already got the XML of RSS feed content as a string, you can load it via that:

$rss_content = 'RSS FEED CONTENT';
$parser->loadString($rss_content);

Both of these methods then return an instance of \Gbuckingham89\YouTubeRSSParser\Channel. You can also access the channel property or call the channel method on the Parser instance to get the Channel object.

You can then access the properties of the channel (see the class file). The videos property is an array of \Gbuckingham89\YouTubeRSSParser\Video objects, on which you can access the properties of the video (see the class file).

Prefer working with arrays? Or JSON? You can simply call the toArray or toJson on both the Channel and Videos objects.

Contributing / bugs

Just open an issue / pull request if you find a bug, or want to contribute!

Copyright and license

Code and documentation copyright 2017 George Buckingham. Code released under the MIT License.


All versions of youtube-rss-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.8|^8.0
guzzlehttp/guzzle Version ^6.2|^7.2
nesbot/carbon Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gbuckingham89/youtube-rss-parser contains the following files

Loading the files please wait ....