Simple PHP Line Notify Class
- PHP 5.5+
- guzzlehttp
Install the latest version with composer
composer require kittinan/php-line-notify
https://packagist.org/packages/kittinan/php-line-notify
https://notify-bot.line.me/my/
Example : notify text message
$token = 'YOUR LINE NOTIFY TOKEN';
$ln = new KS\Line\LineNotify($token);
$text = 'Hello Line Notify';
$ln->send($text);
Example : notify text with image
$text = 'Hello Line Notify';
$image_path = '/YOUR/IMAGE/PATH'; //Line notify allow only jpeg and png file
$ln->send($text, $image_path);
//HTTP or HTTPS image path
$image_path = 'https://lorempixel.com/800/600/'; //Line notify allow only jpeg and png file
$ln->send($text, $image_path);
Example : notify text with sticker
See sticker list https://devdocs.line.me/files/sticker_list.pdf
$text = 'Hello Sticker';
$sticker = ['stickerPackageId' => '1', 'stickerId' => '401'];
$ln->send($text, null, $sticker);
The MIT License (MIT)