- Notifications
You must be signed in to change notification settings - Fork6
php wrapper for telegram cli
License
smoqadam/php-telegram-cli
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
a wrapper class for working withtg-cli inspired byzyberspace/php-telegram-cli-client
create acomposer.json
and put the following command in it :
{ "require": { "smoqadam/telegramcli": "@dev" }}
then run$ composer install
first start tg-cli :
$ ./bin/telegram-cli --json -dWS /tmp/t.sck &
then in your php file :
<?phprequire'vendor/autoload.php';$t =newSmoqadam\TelegramCli('unix:///tmp/t.sck');$contacts =$t->contact_list();//print_r($contacts);echo$t->post($contacts[0]['print_name'],'Hello');
The methods are exactly the same name as the original methods in tg-cli. For exapmple if you want to add new contact in tg-cli you must to useadd_contact <phone> <name> <family>
structure. In php-telegram-cli you must use the following command :
$t->add_contact('phone','name','family');
This is a bery simple class for using tg-cli. If you need some useful features, you can fork it. Please let me know if you find bugs or any problems by openning new issue.
About
php wrapper for telegram cli
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.