Skip to content

Repository files navigation

Urban Airship PHP Library (Beta)

PHP library for use with the Urban Airship API for sending push notifications. Supports iOS, Android, and Blackberry.

Requirements

PHP >= 5.3

Dependencies

  • Composer
  • Httpful
  • Monolog

Development Dependencies

PHPUnit

Example Usage

<?phprequire_once'vendor/autoload.php';
useUrbanAirship\Airship;
useUrbanAirship\AirshipException;
useUrbanAirship\UALog;
useUrbanAirship\PushasP;
useMonolog\Logger;
useMonolog\Handler\StreamHandler;
UALog::setLogHandlers(array(newStreamHandler("php://stdout", Logger::DEBUG)));
$airship = newAirship("<app key>", "<master secret>");
try {
$response = $airship->push()
->setAudience(P\all)
->setNotification(P\notification("Hello from php"))
->setDeviceTypes(P\all)
->send();
} catch (AirshipException$e) {
print_r($e);
}

Resources

About

Urban Airship PHP Library (beta)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages