MadelineProto/ton/lite-client.php

24 lines
445 B
PHP
Raw Normal View History

2019-12-14 18:31:28 +01:00
<?php
use danog\MadelineProto\Logger;
use danog\MadelineProto\TON\API;
2020-02-07 21:13:49 +01:00
use danog\MadelineProto\Tools;
2019-12-14 18:31:28 +01:00
require 'vendor/autoload.php';
$API = new API(
[
'logger' => [
'logger' => Logger::ECHO_LOGGER
]
]
);
$API->async(true);
$API->loop(
function () use ($API) {
yield $API->connect(__DIR__.'/ton-lite-client-test1.config.json');
2019-12-28 18:44:56 +01:00
$API->logger(yield $API->liteServer->getTime());
2019-12-14 18:31:28 +01:00
}
);