Download the PHP package debril/feed-io without Composer

On this page you can find all versions of the php package debril/feed-io. 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 feed-io

feed-io

Latest Stable Version Build Status Maintainability Test Coverage

feed-io is a PHP library built to consume and serve news feeds. It features:

This library is highly extensible and is designed to adapt to many situations, so if you don't find a solution through the documentation feel free to ask in the discussions.

Installation

Use Composer to add feed-io into your project's requirements :

Requirements

feed-io PHP
4.x 7.1+
5.0 8.0+
6.0 8.1+

feed-io 4 requires PHP 7.1+, feed-io 5 requires PHP 8.0+. All versions relies on psr/log and any PSR-18 compliant HTTP client. To continue using you may require php-http/guzzle7-adapter. it suggests monolog for logging. Monolog is not the only library suitable to handle feed-io's logs, you can use any PSR/Log compliant library instead.

Usage

CLI

Let's suppose you installed feed-io using Composer, you can use its command line client to read feeds from your terminal :

reading

feed-io is designed to read feeds across the internet and to publish your own. Its main class is FeedIo :

If you need to get only the new items since the last time you've consumed the feed, use the result's getItemsSince() method:

You can also mix several filters to exclude items according to your needs:

In order to save bandwidth, feed-io estimates the next time it will be relevant to read the feed and get new items from it.

feed-io calculates the next update time by first detecting if the feed was active in the last 7 days and if not we consider it as sleepy. The next update date for a sleepy feed is set to the next day at the same time. If the feed isn't sleepy we use the average interval and the median interval by adding those intervals to the feed's last modified date and compare the result to the current time. If the result is in the future, then it's returned as the next update time. If none of them are in the future, we considered the feed will be updated quite soon, so the next update time is one hour later from the moment of the calculation.

Please note: the fixed delays for sleepy and closed to be updated feeds can be set through Result::getNextUpdate() arguments, see Result for more details.

Feeds discovery

A web page can refer to one or more feeds in its headers, feed-io provides a way to discover them :

Or you can use feed-io's command line :

You'll get all discovered feeds in the output.

formatting an object into a XML stream

Adding a StyleSheet

building a feed including medias

Creating a valid PSR-7 Response with a feed

You can turn a \FeedIo\FeedInstance directly into a PSR-7 valid response using \FeedIo\FeedIo::getPsrResponse() :

Building a FeedIo instance

To create a new FeedIo instance you only need to inject two dependencies :

Another example with Monolog configured to write on the standard output :

Inject a custom Logger

You can inject any Logger you want as long as it implements Psr\Log\LoggerInterface. Monolog does, but it's not the only library : https://packagist.org/providers/psr/log-implementation

Inject a custom HTTP Client

Since 6.0 there is a generic HTTP adapter that wraps any PST-18 compliant HTTP client.

Configure feed-io using the Factory

The factory has been deprecated in feed-io 5.2 and was removed in 6.0. Instantiate the facade directly and pass in the desired HTTP client and logger interface.

Dealing with missing timezones

Sometimes you have to consume feeds in which the timezone is missing from the dates. In some use-cases, you may need to specify the feed's timezone to get an accurate value, so feed-io offers a workaround for that :

Don't forget to reset feedTimezone after fetching the result, or you'll end up with all feeds located in the same timezone.

Built with PHP Storm

Most of feed-io's code was written using PHP Storm courtesy of Jetbrains.


All versions of feed-io with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-dom Version *
ext-json Version *
ext-libxml Version *
guzzlehttp/guzzle Version ~6.2|~7.0
psr/log Version ~1.0|~2.0|~3.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 debril/feed-io contains the following files

Loading the files please wait ....