PHPackages                             anycomment/php-seo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. anycomment/php-seo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

anycomment/php-seo
==================

AnyComment SEO helps to server renders comments on the page.

0.1.0(5y ago)013PHPPHP ^5.6|^7.0

Since Sep 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AnyComment/php-seo)[ Packagist](https://packagist.org/packages/anycomment/php-seo)[ RSS](/packages/anycomment-php-seo/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

AnyComment PHP SEO
==================

[](#anycomment-php-seo)

AnyComment SEO helps to server renders comments on the page.

It generates valid HTML and renders on the page for crawlers to index it.

Minimum requirement is PHP 5.6.

How It Works
------------

[](#how-it-works)

- First of all, embed this library in your PHP project
- comments rendering code on the page where you would like to index comments
- the script will do the rest, it will take current page URL
- send requests to AnyComment API to pull latest comments
- generate valid HTML mark-up for these comments
- output it in `noscript` tag which is not visible to the end user, but seen by crawlers

Internally, library uses cache. Initially it will make HTTP request to AnyComment API, next time it will get value from cache.

Installation
------------

[](#installation)

Add [new package](https://packagist.org/packages/anycomment/php-seo) to `composer.json` in your project directory:

```
composer require anycomment/php-seo
```

or

```
{
  "require":{
    "anycomment/php-seo":"^0.1"
  }
}
```

Examples
--------

[](#examples)

Examples can be found in `/examples` folder.

> Notice that you need to provide your API key for each example to make it work.

Usage
-----

[](#usage)

You need to prepare a configuration class and pass your API key to constructor.

See example:

```
