PHPackages                             byn9826/fake-ssr - 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. [API Development](/categories/api)
4. /
5. byn9826/fake-ssr

AbandonedArchivedLibrary[API Development](/categories/api)

byn9826/fake-ssr
================

Feed web crawlers on rendered HTML for JavaScript rendering pages

2191PHP

Since Apr 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/byn9826/fake-ssr)[ Packagist](https://packagist.org/packages/byn9826/fake-ssr)[ RSS](/packages/byn9826-fake-ssr/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fake SSR
--------

[](#fake-ssr)

Feed web crawlers on rendered HTML for JavaScript rendering pages/Single Page Application.
Users will visit the page normally while web crawlers will directly get already rendered HTML.

Prerequisite
------------

[](#prerequisite)

Install Google Chrome

```
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get -f install

```

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

[](#installation)

```
composer require "byn9826/fake-ssr:dev-master"

```

Usage
-----

[](#usage)

In default controller default action (Handle all the traffic here).

```
use byn9826\FakeSSR\FakeSSR;

class IndexController extends ControllerBase {

  public function indexAction() {
    //$cache_folder is the location of the folder used to cache rendered HTML
    //make sure www-data could execute in this folder
    //$cache_folder could be null if $expire is 0
    $cache_folder = dirname(__dir__) . '/.ssr';

    //$expire is the cache expiring time.
    //Default value is false, means never expire.
    //0 means never use cache.
    //1 means cache for 1 min, 10 means cache for 10 min, 100 means cache for 100 min, etc
    $expire = 0;

    FakeSSR::detect($cache_folder, $expire);

    //Render the index.html for the single page application
    include(dirname(__dir__) . '/frontend/index.html');

  }

}

```

Before fake ssr
---------------

[](#before-fake-ssr)

[![before fake ssr](https://github.com/byn9826/fake-ssr/raw/master/~legend/1.jpg?raw=true)](https://github.com/byn9826/fake-ssr/blob/master/~legend/1.jpg?raw=true)

After fake ssr
--------------

[](#after-fake-ssr)

[![after fake ssr](https://github.com/byn9826/fake-ssr/raw/master/~legend/2.jpg?raw=true)](https://github.com/byn9826/fake-ssr/blob/master/~legend/2.jpg?raw=true)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1484618?v=4)[Baozier](/maintainers/byn9826)[@byn9826](https://github.com/byn9826)

---

Top Contributors

[![byn9826](https://avatars.githubusercontent.com/u/1484618?v=4)](https://github.com/byn9826 "byn9826 (9 commits)")

---

Tags

php-javascriptreact-ssrseoserver-side-renderingsingle-page-appsingle-page-applicationssrvue-ssr

### Embed Badge

![Health badge](/badges/byn9826-fake-ssr/health.svg)

```
[![Health](https://phpackages.com/badges/byn9826-fake-ssr/health.svg)](https://phpackages.com/packages/byn9826-fake-ssr)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
