Skip to content

VerifiedJoseph/ntfy-php-library

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
.ci
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ntfy-php-library

Latest Version Software License

PHP library for sending messages using a ntfy server.

Supports ntfy server version 2.

Install

composer require verifiedjoseph/ntfy-php-library

Quick Start

require __DIR__ . '/vendor/autoload.php';

use Ntfy\Server;
use Ntfy\Message;
use Ntfy\Client;

$server = new Server('https://ntfy.sh/');

$message = new Message();
$message->topic('mytopic');
$message->title('Hello World');
$message->body('Hello World from ntfy.sh');
$message->priority(Message::PRIORITY_HIGH);

$client = new Client($server);
$client->send($message);

Documentation

Requirements

  • PHP >= 8.0
  • Composer
  • PHP Extensions:

Dependencies

guzzlehttp/guzzle

Changelog

All notable changes to this project are documented in the CHANGELOG.

License

MIT License. Please see LICENSE for more information.