https://github.com/javanile/notification
https://github.com/javanile/notification
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/javanile/notification
- Owner: javanile
- License: mit
- Created: 2023-02-05T11:14:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T17:37:10.000Z (over 2 years ago)
- Last Synced: 2025-02-04T16:50:36.975Z (5 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Push example in PHP
Navigating through the commits and files will help you build:
- on the client
- a user friendly opt-in push notification button
- on the server
- an endpoint for managing your push notification subscriptions
- an endpoint that triggers push notification thanks to [web-push-php](https://github.com/web-push-libs/web-push-php)## Requirements
- Chrome or Firefox
- [composer](https://getcomposer.org/)
- PHP 7.2+
- gmp
- mbstring
- curl
- opensslPHP 7.1 is no longer maintained, but you can checkout the `v2.x` branch.
PHP 5.6+ is no longer maintained, but you can checkout the `v1.x` branch.## Installation
```bash
$ composer create-project minishlink/web-push-php-example
$ cd web-push-php-example
```You can change the VAPID keys in the [keys](./keys) folder with [this guide](https://github.com/web-push-libs/web-push-php#authentication-vapid).
Don't forget to update the public key in [app.js](./src/app.js) too.## Usage
```bash
$ php -S localhost:8000 router.php
```And open [localhost:8000](http://localhost:8000).
# notification