| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- /**
- * Created by PhpStorm.
- * User: chendeben
- * Date: 2017/12/6
- * Time: 11:50
- */
- namespace PhpLife\App\Api\Controller;
- use PhpLife\App\Api\Package\Database\File;
- use PhpLife\App\Api\Package\Database\Hash;
- use PhpLife\App\Api\Controller;
- use PhpLife\Frame\Logger;
- use PhpLife\Library\Sphinx;
- class Telegram extends Controller
- {
- public function main(){
- $telegram=new \Telegram("532191649:AAGxdBNPQGrHo0Ralqpg_sSZFrJJwCh0KIk");
- $msg=$telegram->getData();
- Logger::setLog("cdb@meitu.com",json_encode($msg));
- if ($msg=="地址"){
- $chat_id = $telegram->ChatID();
- $content = array('chat_id' => $chat_id, 'text' => '最新的官网地址是【 https://ss5.my110.cf 】');
- $telegram->sendMessage($content);
- }else{
- $chat_id = $telegram->ChatID();
- $content = array('chat_id' => $chat_id, 'text' => '你说:'.json_encode($msg));
- $telegram->sendMessage($content);
- }
- }
- }
|