{"id":37009031,"url":"https://github.com/byn9826/fake-ssr","last_synced_at":"2026-01-14T00:51:40.846Z","repository":{"id":62498609,"uuid":"119917177","full_name":"byn9826/fake-ssr","owner":"byn9826","description":"Feed web crawlers with rendered HTML for JavaScript rendering pages/Single Page Applications","archived":true,"fork":false,"pushed_at":"2018-04-16T01:42:44.000Z","size":155,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-21T08:29:48.698Z","etag":null,"topics":["php-javascript","react-ssr","seo","server-side-rendering","single-page-app","single-page-application","ssr","vue-ssr"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/byn9826/fake-ssr","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byn9826.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-02T01:52:37.000Z","updated_at":"2023-01-28T16:56:35.000Z","dependencies_parsed_at":"2022-11-02T11:46:53.294Z","dependency_job_id":null,"html_url":"https://github.com/byn9826/fake-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/byn9826/fake-ssr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byn9826%2Ffake-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byn9826%2Ffake-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byn9826%2Ffake-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byn9826%2Ffake-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byn9826","download_url":"https://codeload.github.com/byn9826/fake-ssr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byn9826%2Ffake-ssr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28407340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php-javascript","react-ssr","seo","server-side-rendering","single-page-app","single-page-application","ssr","vue-ssr"],"created_at":"2026-01-14T00:51:40.200Z","updated_at":"2026-01-14T00:51:40.837Z","avatar_url":"https://github.com/byn9826.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fake SSR\n--\nFeed web crawlers on rendered HTML for JavaScript rendering pages/Single Page Application.  \nUsers will visit the page normally while web crawlers will directly get already rendered HTML.  \n\nPrerequisite\n--\nInstall Google Chrome\n```\nwget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\nsudo dpkg -i google-chrome-stable_current_amd64.deb\nsudo apt-get -f install\n```\nInstallation\n--\n```\ncomposer require \"byn9826/fake-ssr:dev-master\"\n```\nUsage\n--\nIn default controller default action (Handle all the traffic here).  \n```\nuse byn9826\\FakeSSR\\FakeSSR;\n\nclass IndexController extends ControllerBase {\n\n  public function indexAction() {\n    //$cache_folder is the location of the folder used to cache rendered HTML  \n    //make sure www-data could execute in this folder    \n    //$cache_folder could be null if $expire is 0  \n    $cache_folder = dirname(__dir__) . '/.ssr';  \n\t\t  \n    //$expire is the cache expiring time.   \n    //Default value is false, means never expire.   \n    //0 means never use cache.   \n    //1 means cache for 1 min, 10 means cache for 10 min, 100 means cache for 100 min, etc  \n    $expire = 0;  \n    \n    FakeSSR::detect($cache_folder, $expire);  \n\n    //Render the index.html for the single page application  \n    include(dirname(__dir__) . '/frontend/index.html');\n\t\t\n  }\n\n}\n```\n\nBefore fake ssr  \n--\n![before fake ssr](https://github.com/byn9826/fake-ssr/blob/master/~legend/1.jpg?raw=true)\n\t\nAfter fake ssr  \n--\n![after fake ssr](https://github.com/byn9826/fake-ssr/blob/master/~legend/2.jpg?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyn9826%2Ffake-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyn9826%2Ffake-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyn9826%2Ffake-ssr/lists"}