Untitled
4 years ago in PHP
<?php
define('API_KEY','998445664:AAE3I2fWC_yfGfay-wwWarjk7ABjx8wVsqg');
/*
creator : @NeoMonsters
channels : @PHP_BOX , @PHP_CODS
*/
function bot($method,$datas=[]){
$url = "https://api.telegram.org/bot".API_KEY."/".$method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query($datas));
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$chat_id = $update->message->chat->id;
$message_id = $update->message->message_id;
$from_id = $update->message->from->id;
$text = $update->message->text;
$inline = $update->inline_query->query;
$usd = json_decode(file_get_contents("https://api.exchangeratesapi.io/latest?base=USD"))->rates->ILS;
function SendMessage($chat_id,$text,$mode){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>$text,
'parse_mode'=>$mode,
]);
}
if($text == '/start'){
bot('sendmessage',[
'chat_id'=>$chat_id,
'text'=>'馃挶 诪讬讚注 注诇 注专讱 诪讟"讞',
'reply',
'parse_mode'=>"MarkDown",
'reply_markup'=>json_encode([
'inline_keyboard'=>[
[['text'=>"馃憟 诇讞抓 讻讗谉 馃憠",'switch_inline_query_current_chat'=>'']]
]
])
]);
}
date_default_timezone_set('Asia/Jerusalem');
$time = date('h:i');
$year = date('Y');
$month = date('n');
$day = date('j');
$inlinequery = $update->inline_query->query;
$inlineID = $update->inline_query->from->id;
$usd = json_decode(file_get_contents("https://free.currconv.com/api/v7/convert?q=USD_ILS&compact=ultra&apiKey=e74ee168ade7e60750b2"))->USD_ILS;
$eur = json_decode(file_get_contents("https://free.currconv.com/api/v7/convert?q=EUR_ILS&compact=ultra&apiKey=e74ee168ade7e60750b2"))->EUR_ILS;
$gbp = json_decode(file_get_contents("https://free.currconv.com/api/v7/convert?q=GBP_ILS&compact=ultra&apiKey=e74ee168ade7e60750b2" ))->GBP_ILS;
$cny = json_decode(file_get_contents("https://free.currconv.com/api/v7/convert?q=CNY_ILS&compact=ultra&apiKey=e74ee168ade7e60750b2"))->CNY_ILS;
$btc = json_decode(file_get_contents("https://api.coindesk.com/v1/bpi/currentprice/ILS.json"))->bpi->ILS->rate;
if($text != '/start'){
bot('answerInlineQuery',[
'inline_query_id'=>$update->inline_query->id,
'results' => json_encode([[
'type'=>'sticker',
'id'=>base64_encode(rand(5,555)),
'title'=>"",
'sticker_file_id'=>'CAACAgQAAxkBAAEEAyNeXkTFyy-Vc1Y7_bZ193YH85qbkAACcwYAApUX-VLzyqLY3ss0FhgE',
'reply_markup'=>['inline_keyboard'=>[
[['text'=>"馃敼 拽砖转 12",'url'=>'http://keshethlslive-lh.akamaihd.net/i/c2n_1@195269/master.m3u8'],['text'=>'馃敼 讻讗谉 11','url'=>'https://kanlivep2event-i.akamaihd.net/hls/live/747610/747610/master.m3u8']],
[['text'=>"馃敼 注专讜抓 20",'url'=>'http://live.ch20-cdnwiz.com/ch20-abr/ch20-abr/playlist.m3u8'],['text'=>'馃敼 专砖转 13','url'=>'https://reshet-live.ctedgecdn.net/13tv-desktop/nodvr/r13_2400.m3u8']],
[['text'=>"馃敼 住驻讜专讟 5",'url'=>'https://sport5-lh.akamaihd.net/i/radiolivev_0@698733/master.m3u8'],['text'=>'馃敼 讛讬讚讘专讜转','url'=>'https://stream71.shidur.net/htvlive2/_definst_/smil:live2.smil/chunklist_b1248000.m3u8' ]],
[['text'=>"馃敼 注专讜抓 讛拽谞讬讜转",'url'=> 'https://stream71.shidur.net/htvlive2/_definst_/smil:live2.smil/chunklist_b1248000.m3u8'],
['text' => '馃敼 注专讜抓 讛讻谞住转', 'url' =>'http://w3.013.gostreaming.tv:1935/Knesset/myStream/playlist.m3u8']]
]]]
])
]);
}
?>