cybercog/php-pushwoosh

A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.

Maintainers

Package info

github.com/cybercog/php-pushwoosh

pkg:composer/cybercog/php-pushwoosh

Fund package maintenance!

paypal.me/antonkomarev

Statistics

Installs: 6 053

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 2

2.2.0 2025-10-15 14:51 UTC

README

A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.

Forked gomoob/php-pushwoosh because original project stalled.

Releases Build License

Installation

Pull in the package through Composer.

composer require cybercog/php-pushwoosh

Usage

Sample of creating and sending the Pushwoosh message.

// 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

About CyberCog

CyberCog is a Social Unity of enthusiasts. Research the best solutions in product & software development is our passion.

CyberCog