KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#cli
#claude-code
#codex
#developer-tools
#react
#windows
php-gcm
★ 180
Open GitHub ↗
An easy to use gcm library for PHP
Download README (.md)
Explore Similar Repositories
100-words-design-patterns-java
:
GoF Design Patterns, each pattern described with story from real life.
kirk
:
A highly-flexible thread pool for Rust
epoll_threadpool
:
A small, clean, linux-only thread-pool implementation using epoll with support for sockets, scheduled callbacks and TCP connections.
IdentityServer4-Example
:
Example IdentityServer4 & Duende IdentityServer implementation.
kdtree
:
Absolute balanced kdtree for fast kNN search.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
php-gcm
?
Download (.md)
# php-gcm [](https://travis-ci.org/lkorth/php-gcm) [](https://packagist.org/packages/php-gcm/php-gcm) Why -------- [Google Cloud Messaging for Android](http://developer.android.com/google/gcm/index.html) is very powerful, but there are a lot of details to handle. This library takes care of the details and makes GCM very easy to use with PHP. Support ------- php-gcm supports the [HTTP server protocol](https://developers.google.com/cloud-messaging/server) for GCM. There is not currently support for XMPP, but implementations and pull requests for XMPP are welcome. See [#3](https://github.com/lkorth/php-gcm/issues/3) for more details. php-gcm supports PHP versions >= 5.3.10. php-gcm may work on older versions of PHP, but has not been tested on them. Install --------- Composer is the easiest way to manage dependencies in your project. Create a file named composer.json with the following: ```json { "require": { "php-gcm/php-gcm": "^1.1.1" } } ``` And run Composer to install php-gcm: ```bash $ curl -s http://getcomposer.org/installer | php $ composer.phar install ``` ### Latest php-gcm follows [SEMVER](http://semver.org/). If you would like to try out the latest, possibly unstable or incorrect code, the dependency can be pointed to `dev-master`. ```json { "require": { "php-gcm/php-gcm": "dev-master" } } ``` Usage ------- ```php $sender = new Sender($gcmApiKey); $message = new Message($collapseKey, $payloadData); try { $result = $sender->send($message, $deviceRegistrationId, $numberOfRetryAttempts); } catch (\InvalidArgumentException $e) { // $deviceRegistrationId was null } catch (PHP_GCM\InvalidRequestException $e) { // server returned HTTP code other than 200 or 503 } catch (\Exception $e) { // message could not be sent } ``` License -------- php-gcm is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for more details.