phpdesktop
phpdesktop copied to clipboard
Support for desktop notifications
Add example of using JoliNotif PHP library to display desktop notifications. With this library you can send desktop notifications directly from your PHP script. Works on Windows, Mac and Linux, see: https://github.com/jolicode/JoliNotif
Html5 Notifications API is not supported by CEF which PHP Desktop uses to embed Chrome browser.
In the future we may add native support for desktop notifications and expose such API through window.phpdesktop
javascript object.
Hi @cztomczak,
I would like to know how would we execute PHP lib in client_handler.cpp
? The way I see it, all available methods inside window.phpdesktop
object are Cef related and are handled in ClientHandler::OnProcessMessageReceived
. Do you have a strategy in mind?
I checked the PHP lib in your above comment and its a wrapper around executables inside bin directory.
The way I see it, we would need to use a C/C++ lib that can provide the same functionality or go the same route as JoliNotif and wrap the code.
You can execute any binary (PHP or notifu) from C++. On Windows use ShellExecuteEx
. Example code: https://github.com/cztomczak/phpdesktop/search?q=shellexecuteex&unscoped_q=shellexecuteex