{"id":15939491,"url":"https://github.com/sergiomadness/php-push-notification-server","last_synced_at":"2026-05-19T09:04:35.304Z","repository":{"id":93989204,"uuid":"99215566","full_name":"SergioMadness/php-push-notification-server","owner":"SergioMadness","description":"Push-notification server","archived":false,"fork":false,"pushed_at":"2017-10-02T14:37:34.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T06:26:18.111Z","etag":null,"topics":["apns-http2","apns2","docker","gcm","push-notifications","service"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SergioMadness.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-08-03T09:28:38.000Z","updated_at":"2024-05-26T04:55:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c97fa0fd-ea74-4566-b89b-d3acf2f77c01","html_url":"https://github.com/SergioMadness/php-push-notification-server","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"92110fa5e2d889ce6fadf16665c1a2ec94b4c579"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SergioMadness/php-push-notification-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fphp-push-notification-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fphp-push-notification-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fphp-push-notification-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fphp-push-notification-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergioMadness","download_url":"https://codeload.github.com/SergioMadness/php-push-notification-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioMadness%2Fphp-push-notification-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33209432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apns-http2","apns2","docker","gcm","push-notifications","service"],"created_at":"2024-10-07T06:04:47.067Z","updated_at":"2026-05-19T09:04:35.264Z","avatar_url":"https://github.com/SergioMadness.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push sender\n\n# Connection through TCP/IP sockets\n\n## config.json\n```javascript\n{\n  \"ip\": \"\",\n  \"port\": 10000,\n  \"jwtToken\": \"kjdsfhjk849678946\",\n  \"apns\": {\n    \"all\": {\n      \"key\": \"certificates/AuthKey_FHH747JJD.p8\",\n      \"keyPassword\": \"\",\n      \"keyId\": \"FHH747JJD\",\n      \"teamId\": \"SERTYUJJ\",\n      \"production\": false\n    }\n  },\n  \"gcm\": {\n    \"all\": {\n      \"apiKey\": \"AIzJdurHh377f7O95u-OAS_KKdfhh57878L4QcQ\",\n      \"retries\": 0\n    },\n    \"byPattern\": {\n      \"apiKey\": \"AJSGHdshjd8Hhhjf7O95u-OAS_KKdfhh57878L4QcQ\",\n      \"retries\": 10\n    }\n  },\n  \"map\": {\n    \"apns\": {\n      \"*\": \"corp\"\n    },\n    \"gcm\": {\n      \"*\": \"all\",\n      \"*pattern*\": \"byPattern\"\n    }\n  }\n}\n```\n\n## message\n```php\n\\JWT::encode([\n    'tokens'      =\u003e [\n\t    'dasasd8962ghgre'\n    ],\n    'bundleId'    =\u003e 'ru.test.baundle',\n    'message'     =\u003e 'Service is ready',\n    'title'       =\u003e 'Hello, guys!',\n    'sound'       =\u003e null,\n    'extraParams' =\u003e [\n\t    'acme' =\u003e ''\n    ],\n], $this-\u003egetJwtKey());\n```\n\n## response\n```javascript\n[\n   {\n      \"token\":\"dasasd8962ghgre\",\n      \"statusCode\":400,\n      \"message\":\"DeviceTokenNotForTopic\\nThe device token does not match the specified topic\"\n   }\n]\n```\n\n## Example\n```bash\nsudo docker run -d -i --name pusher -p 10000:10000 -v /home/www-docker/builds/build-pusher-1/certificates:/usr/src/pusher/certificates -v /home/www-docker/builds/build-pusher-1/config.json:/usr/src/pusher/config.json professionalweb/push-notification-server\n```\n\n```php\n/* Create  TCP/IP socket. */\n$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\nif ($socket === false) {\n    $m = \"Can't create socket through socket_create(): couse: \" . socket_strerror(socket_last_error());\n    \\Log::error($m);\n    throw new \\Exception($m);\n}\n\n$result = socket_connect($socket, $this-\u003egetPushServiceIp(), $this-\u003egetPushServicePort());\nif ($result === false) {\n    $m = \"Can't execute socket_connect().\\nCause: ($result) \" . socket_strerror(socket_last_error($socket)) . \"\\n\";\n    \\Log::error($m);\n    throw new \\Exception($m);\n}\n\n$message = \\JWT::encode([\n           'platform'    =\u003e 'android',\n           'tokens'      =\u003e ['dasdw534535'],\n           'bundleId'    =\u003e 'ru.bundle.name',\n           'message'     =\u003e 'Have a nice day!',\n           'title'       =\u003e 'Hello',\n           'sound'       =\u003e '',\n           'extraParams' =\u003e [\n                'acme' =\u003e 'Some param'\n           ],\n       ], '\u003cJWT-KEY\u003e')\nsocket_write($socket, $message, strlen($message));\n$message = \"\\n\";\nsocket_write($socket, $message, strlen($message));\n\n$response = socket_read($socket, 2048);\n\nsocket_close($socket);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiomadness%2Fphp-push-notification-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiomadness%2Fphp-push-notification-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiomadness%2Fphp-push-notification-server/lists"}