PHP code example of ateliee / lineapi

1. Go to this page and download the library: Download ateliee/lineapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ateliee / lineapi example snippets


$bot = Ateliee\LineApi("<Channel ID>", "<Channel Secret>", "<Channel MID>", "<Endpoint URL>");
$bot->isValid(); // true only if signature was valid.
$bot->sendText("<to>", "<text>"); // send text message.
$bot->postEvents($events);