Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

maximegel/poc-browser-notifications-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Browser notifications demo

Example implementation of web notifications using Service Worker, Push API and PHP.


Installation

> git clone https://github.com/maximegelinas/browser-notifications-php-demo.git
> composer install

Usage

In the project directory run the following command:

> composer start

Then navigate to http://localhost:8080/.

Please note that a notification may take a few minutes to appear.


Troubleshooting

If the demo is not working properly in your environment, open the Development Tools console, note the error message and see the section above that corresponds to your error. If there is no section for your error, please open an issue.

HTTP posts returns some PHP warnings in JSON data.

  1. Set always_populate_raw_post_data to -1 in in your php.ini.
  2. Restart your web server.

CURL error 60: SSL certificate problem: unable to get local issuer certificate.

  1. Download cacert.pem.
  2. Put it here <path to PHP>/extras/ssl/cacert.pem.
  3. Add curl.cainfo = <path to PHP>/extras/ssl/cacert.pem after the [curl] section in your php.ini.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published