{"id":19218745,"url":"https://github.com/fadilxcoder/php-mercure","last_synced_at":"2025-08-26T11:34:03.526Z","repository":{"id":86245670,"uuid":"563541829","full_name":"fadilxcoder/php-mercure","owner":"fadilxcoder","description":"PHP Mercure Protocol - real-time communications","archived":false,"fork":false,"pushed_at":"2022-11-08T20:41:11.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T09:14:48.955Z","etag":null,"topics":["client","mercure","notes","php","poc","server"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fadilxcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T20:38:43.000Z","updated_at":"2022-11-08T20:42:23.000Z","dependencies_parsed_at":"2023-03-08T10:00:33.732Z","dependency_job_id":null,"html_url":"https://github.com/fadilxcoder/php-mercure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fadilxcoder/php-mercure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fphp-mercure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fphp-mercure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fphp-mercure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fphp-mercure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadilxcoder","download_url":"https://codeload.github.com/fadilxcoder/php-mercure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fphp-mercure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272214419,"owners_count":24893201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["client","mercure","notes","php","poc","server"],"created_at":"2024-11-09T14:27:57.396Z","updated_at":"2025-08-26T11:34:03.503Z","avatar_url":"https://github.com/fadilxcoder.png","language":"PHP","readme":"# Notes\n\n- https://github.com/dunglas/mercure/releases (Mercure github releases)\n```\nmercure_0.14.1_Windows_x86_64.zip               14.5 MB             Sep 13\n```\n- Download and extract in  `server`\n- Launch **Mercure server** : `$ MERCURE_PUBLISHER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' MERCURE_SUBSCRIBER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' ./server/mercure.exe run -config ./server/Caddyfile.dev`\n- https://github.com/dunglas/mercure - Mercure Git repo docs\n- https://github.com/symfony/mercure - Mercure Component\n- https://symfony.com/blog/symfony-gets-real-time-push-capabilities - (Symfony Gets Real-time Push Capabilities!)\n- Mercure server : `https://localhost/.well-known/mercure`\n- PHP Server notification dispatcher : `http://localhost/php-mercure/index.php`\n- Static Client : `http://localhost/php-mercure/client.php`\n\n\n**Subscribing to updates from a web browser**\n- https://mercure.rocks/docs/getting-started (Mercure documentation)\n- Static HTML client to recieve notification - `client.php`\n\n```js\n// The subscriber subscribes to updates for the https://example.com/users/dunglas topic\n// and to any topic matching https://example.com/books/{id}\nconst url = new URL('https://localhost/.well-known/mercure');\nurl.searchParams.append('topic', 'https://localhost/demo/books/1.jsonld');\nurl.searchParams.append('topic', 'https://example.com/users/dunglas');\n// The URL class is a convenient way to generate URLs such as https://localhost/.well-known/mercure?topic=https://example.com/books/{id}\u0026topic=https://example.com/users/dunglas\n\nconst eventSource = new EventSource(url);\n\n// The callback will be called every time an update is published\neventSource.onmessage = e =\u003e console.log(e); // do something with the payload\n```\n\n---\n\n\u003cimg src=\"./mercure.PNG\" alt=\"SS\"/\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fphp-mercure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadilxcoder%2Fphp-mercure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fphp-mercure/lists"}