Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

php wrapper for telegram cli

License

NotificationsYou must be signed in to change notification settings

smoqadam/php-telegram-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a wrapper class for working withtg-cli inspired byzyberspace/php-telegram-cli-client

install

create acomposer.json and put the following command in it :

{    "require": {        "smoqadam/telegramcli": "@dev"    }}

then run$ composer install

How to use

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');

Contributing

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp