PHP Classes

File: examples/text.php

Recommend this page to a friend!
  Classes of Saeb Khanzadeh   Gap SDP API   examples/text.php   Download  
File: examples/text.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Gap SDP API
Send messages with the Gap instant messenger
Author: By
Last change:
Date: 6 years ago
Size: 333 bytes


Class file image Download

require dirname(__FILE__) . '/../vendor/autoload.php';


$token = {HERE YOUR TOKEN};

$gm = new Api($token);

$chat_id = {HERE CHAT ID};

$replyKeyboard = $gm->replyKeyboard([[['yes' => 'Yes'], ['no' => 'No']], [['cancel' => 'Cancel']]]);

// send text
$gm->sendText($chat_id, 'Hello world', $replyKeyboard);