function valid() {
$request_from_telegram = true;
if(isset($_POST)) {
$data = file_get_contents("php://input");
if (json_decode($data) != null)
$request_from_telegram = json_decode($data ,1);
}
return $request_from_telegram;
}
function sendMessage($chat_id,$text, $markup=null)
{
if (isset($chat_id))
{
return get($GLOBALS['url'].'sendMessage?chat_id='.$chat_id.'&text='.urlencode($text).'&reply_markup='.$markup.'&parse_mode=Markdown');
}
}