telegram-s / telegram-tl-old

TL Compiler for Telegram project
MIT License
58 stars 26 forks source link

new build? #1

Open Smove opened 10 years ago

Smove commented 10 years ago

Why there are no new releases over 10? On windows the tl-builder builder dont create any jar so we need to download it from here.

MAJIDV64 commented 8 years ago

//telegram sdk and configuration $client = new Zelenin\Telegram\Bot\Api('someRandomToken');

$update = json_decode(file_get_contents('php://input'));

//your app try {

if($update->message->text != '/next_event_datetime')
    exit;

$dom = Sunra\PhpSimple\HtmlDomParser::file_get_html('http://laratalks.com/');
$element = $dom->find('#location header.section-header h3', 0);
$dateTime = $element->plaintext;

$response = $client->sendMessage([
    'chat_id' => $update->message->chat->id,
    'text' => $dateTime
]);

} catch (\Zelenin\Telegram\Bot\NotOkException $e) {

//echo error message ot log it
//echo $e->getMessage();

}