承接 smoqadam/telegramcli 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smoqadam/telegramcli

Composer 安装命令:

composer require smoqadam/telegramcli

包简介

php wrapper for telegram cli

README 文档

README

PHP Telegram CLI

a wrapper class for working with tg-cli inspired by zyberspace/php-telegram-cli-client

install

create a composer.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 :

<?php

require 'vendor/autoload.php';
$t = new Smoqadam\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 use add_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.

统计信息

  • 总下载量: 2.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固