Functions

Functions

@BotSorce

#درخواستی

➖➖➖➖➖➖➖➖➖➖➖➖

فانکشن : 

♦⭕ دریافت تعداد تصاویر پروفایل کاربر⬇⬇⬇


function GetProfileCount($from_id){

  $get = file_get_contents('https://api.telegram.org/bot'.API_KEY.'/getUserProfilePhotos?user_id='.$from_id);

  $decode = json_decode($get, true);

   return $decode['result']['total_count'];

}

➖➖➖➖➖➖➖➖➖➖➖➖


فانکشن :

♦⭕ دریافت تصویر کاربر ربات تلگرام⬇⬇⬇


function getUserProfilePhotos($token,$from_id) {

 $url = 'https://api.telegram.org/bot'.$token.'/getUserProfilePhotos?user_id='.$from_id;

 $result = file_get_contents($url);

 $result = json_decode ($result);

 $result = $result->result;

 return $result;

}

➖➖➖➖➖➖➖➖➖➖➖➖

فانکشن :

♦⭕ دریافت آیدی عددی ادمین های گروه⬇⬇⬇


function adminlist($chat_id){

 $up = json_decode(file_get_contents('https://api.telegram.org/bot'.API_KEY.'/getChatAdministrators?chat_id='.$chat_id),true);

 $result = $up['result'];

$msg = "";

 foreach($result as $key=>$value){

  $found = $result[$key]['status'];

  if($found == "creator"){

   $owner = $result[$key]['user']['id'];

  }

if($found == "administrator"){

$msg= $msg."\n".$result[$key]['user']['id'];

}

 }

return $owner."".$msg;

}

➖➖➖➖➖➖➖➖➖➖➖➖


فانکشن : 

♦⭕ دریافت اطلاعات یک عضو در گروه یا کانال ربات تلگرام⬇⬇⬇



function GetChatMember($chatid,$userid){

 $truechannel = json_decode(file_get_contents('https://api.telegram.org/bot'.API_KEY."/getChatMember?chat_id=".$chatid."&user_id=".$userid));

 $tch = $truechannel->result->status;

 return $tch;

 }

➖➖➖➖➖➖➖➖➖➖➖➖‌


فانکشن :

♦⭕ ذخیره اطلاعات در یک فایل TXT⬇⬇⬇



function save($filename,$TXTdata){

 $myfile = fopen($filename, "w") or die("Unable to open file!");

 fwrite($myfile, "$TXTdata");

 fclose($myfile);

 }

➖➖➖➖➖➖➖➖➖➖➖➖



کانال ما در تلگرام

@Botsorce

Report Page