https://github.com/cybercog/php-pushwoosh
A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.
https://github.com/cybercog/php-pushwoosh
notification-android notification-ios notifications php push push-notifications pushwoosh
Last synced: 4 months ago
JSON representation
A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.
- Host: GitHub
- URL: https://github.com/cybercog/php-pushwoosh
- Owner: cybercog
- License: mit
- Created: 2020-10-05T12:20:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T14:58:10.000Z (about 1 year ago)
- Last Synced: 2025-07-20T22:37:49.028Z (6 months ago)
- Topics: notification-android, notification-ios, notifications, php, push, push-notifications, pushwoosh
- Language: PHP
- Homepage: http://gomoob.github.io/php-pushwoosh
- Size: 1.8 MB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Pushwoosh
A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.
Forked [gomoob/php-pushwoosh](https://github.com/gomoob/php-pushwoosh) because original project stalled.
## Installation
Pull in the package through Composer.
```shell script
composer require cybercog/php-pushwoosh
```
## Usage
Sample of creating and sending the Pushwoosh message.
```php
// Create a Pushwoosh client
$pushwoosh = Pushwoosh::create()
->setApplication('XXXX-XXX')
->setAuth('xxxxxxxx');
// Create a request for the '/createMessage' Web Service
$request = CreateMessageRequest::create()
->addNotification(Notification::create()->setContent('Hello Jean !'));
// Call the REST Web Service
$response = $pushwoosh->createMessage($request);
// Check if it's ok
if ($response->isOk()) {
print 'Great, my message has been sent !';
} else {
print 'Oops, the sent failed :-(';
print 'Status code : ' . $response->getStatusCode();
print 'Status message : ' . $response->getStatusMessage();
}
```
## License
- `PHP Pushwoosh` package is open-sourced software licensed under the [MIT license](LICENSE) by [Anton Komarev].
## About CyberCog
[CyberCog] is a Social Unity of enthusiasts. Research the best solutions in product & software development is our passion.
- [Follow us on Twitter](https://twitter.com/cybercog)
[Anton Komarev]: https://komarev.com
[CyberCog]: https://cybercog.su
