PHP5.4 Yandex Turbo Pages RSS feed generator
Clone or download

PHP5 Yandex Turbo Pages RSS feed generator

Latest Stable Version Total Downloads Latest Unstable Version composer.lock PHPPackages Rank PHPPackages Referenced By
Travis CI Build Status
Scrutinizer CI Build Status Scrutinizer Code Quality Code Coverage

Russian version of README you can find here:

Yandex Turbo Pages valid RSS feed generator for PHP5.4+.

Version for PHP7 or later you can find here.


This example you can find in examples/example.php

// creates Feed with all needed namespaces
$feed = new Feed();

// creates Channel with description and one ad from Yandex Ad Network
$channel = new Channel();
    ->title('Channel Title')
    ->description('Channel Description')
    ->adNetwork(Channel::AD_TYPE_YANDEX, 'RA-123456-7', 'first_ad_place')

// adds Google Analytics to feed
$googleCounter = new Counter(Counter::TYPE_GOOGLE_ANALYTICS, 'XX-1234567-89');

// adds Yandex Metrika to feed
$yandexCounter = new Counter(Counter::TYPE_YANDEX, 12345678);

// creates first page of feed with link and enabled turbo, description and other content, and appends this page to channel
$item = new Item();
    ->title('Thirst page!')
    ->author('John Smith')
    ->turboContent('Some content here!<br>Second content string.')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))

// creates list of related pages
$relatedItemsList = new RelatedItemsList();

// adds link to first related page
$relatedItem = new RelatedItem('Related article 1', '');

// adds link to second related page with image
$relatedItem = new RelatedItem('Related article 2', '',

// appends list of related links to first page

// creates another one page with disabled turbo
$item = new Item(false);
    ->title('Second page!')
    ->author('John Smith')
    ->turboContent('Yet another content here!')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))

// displays the generated feed
echo $feed;

For generating content for turbo items you can use Content helper. For example:

// generate header
$menuArray = [
    ['url' => 'http://example/page1.html', 'title' => 'Page title 1'],
    ['url' => 'http://example/page2.html', 'title' => 'Page title 2']
$header = Content::header('Main title', 'Second title',
    '', 'Image description', $menuArray);

At this time you can use helpers for generate next elements:

  • page header including menu;
  • image;
  • images gallery;
  • share buttons;
  • link or phone button;
  • comments;
  • rating;
  • accordion;
  • video from own server;
  • video from external server;
  • ad block position element;
  • media-content with slider;
  • additional content block.

Examples of using helpers you can find in examples/content_helpers.php.


# Install Composer
curl -sS | php

Next, run the Composer command to install the latest stable version of yandex-turbo-pages

php composer.phar require sokolnikov911/yandex-turbo-pages-php5

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update yandex-turbo-pages using composer:

composer.phar update


This Yandex Trurbo Pages RSS feed generator requires at least PHP5.4.



This library is licensed under the MIT License.