Open Smove opened 10 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();
}
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.