2017 © Pedro Peláez
 

library telegrambot-php-library

TelegramBot PHP unofficial library.

image

paranoiasystem/telegrambot-php-library

TelegramBot PHP unofficial library.

  • Monday, July 27, 2015
  • by paranoiasystem
  • Repository
  • 4 Watchers
  • 11 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

TelegramBot-PHP-library

Travis Packagist Total Downloads GitHub license, (*1)

TelegramBot is an unofficial library in PHP for use the Telegram APIs for bot, (*2)

Install

Via Composer, (*3)

``` bash $ composer require paranoiasystem/telegrambot-php-library, (*4)


## Usage Send Message ``` php sendMessage('chat_id', 'text'); ``` Send Photo ``` php sendPhoto('chat_id', 'path_to_photo'); //or $bot->sendPhoto('chat_id', array('file_id' => 'file_id_value')); ``` ## Bot Example Set WebHook ``` php setWebhook("https://url.to/hook.php"); //only https if($response->description == "Webhook was set") echo "Ok! The bot is ready!"; else{ echo "Ops! Error
"; print_r($response); } ?>

BotCore (hook.php), (*5)

php hook(); $comand = $response->message->text; if(substr($comand, 0, strlen("/echo")) === "/echo") $bot->sendMessage($response->message->chat->id, str_replace("/echo", "", $comand)); if(substr($comand, 0, strlen("/img")) === "/img") $bot->sendPhoto($response->message->chat->id, 'path_to_photo'); ?>, (*6)

The Versions

27/07 2015

1.0.3

1.0.3.0

TelegramBot PHP unofficial library.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

by Marco Ferraioli A.K.A. ParanoiaSystem

26/07 2015

1.0.2

1.0.2.0

TelegramBot PHP unofficial library.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

by Marco Ferraioli A.K.A. ParanoiaSystem

26/07 2015

dev-master

9999999-dev

TelegramBot PHP unofficial library.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

by Marco Ferraioli A.K.A. ParanoiaSystem

26/07 2015

1.0.1

1.0.1.0

TelegramBot PHP unofficial library.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

by Marco Ferraioli A.K.A. ParanoiaSystem