├── README.md └── insta.php /README.md: -------------------------------------------------------------------------------- 1 | # insta-downloader-bot 2 | instagram post downloader with telegram php bot 3 | 4 | # my Team Channel 5 | https://telegram.me/Foremost_Team 6 | -------------------------------------------------------------------------------- /insta.php: -------------------------------------------------------------------------------- 1 | message; 23 | $message_id = $message->message_id; 24 | $chat_id = $message->chat->id; 25 | $fname = $message->chat->first_name; 26 | $uname = $message->chat->username; 27 | $text1 = $message->text; 28 | $fadmin = $message->from->id; 29 | $chatid = $update->callback_query->message->chat->id; 30 | if($text1=="/start"){ 31 | bot('sendmessage',[ 32 | 'chat_id'=>$chat_id, 33 | 'text'=>"با سلام به ربات اینستا دانلودر خوش آمدید\n\nلطفا لینک پست اینستاگرامتون رو بفرستید تا براتون دانش کنم و بفرستمش😘" 34 | ]); 35 | } 36 | elseif($text1=="/creator"){ 37 | bot('sendmessage',[ 38 | 'chat_id'=>$chat_id, 39 | 'text'=>"این ڔبات توسط @phpfun_bot ساخته شده است", 40 | ]); 41 | } 42 | 43 | 44 | else{ 45 | $instalink="http://eletest.teleagent.ir/insta/?url=$text1"; 46 | $insta=json_decode(file_get_contents($instalink),trur); 47 | $ok=$insta['ok']; 48 | $photo=$insta['aks']; 49 | $video=$insta['video']; 50 | if($ok=="false"){ 51 | bot('sendmessage',[ 52 | 'chat_id'=>$chat_id, 53 | 'text'=>"لینک شما نامبعتر و غلط میباشد⛔", 54 | ]); 55 | }elseif($photo=="false") 56 | { 57 | bot('sendvideo',[ 58 | 'chat_id'=>$chat_id, 59 | 'video'=>$video, 60 | 'caption'=>"فیلم شما دانلود شد✅", 61 | ]); 62 | 63 | } else{ 64 | bot('sendphoto',[ 65 | 'chat_id'=>$chat_id, 66 | 'photo'=>$photo, 67 | 'caption'=>"عکس شما دانلود شد✅", 68 | ]); 69 | 70 | } 71 | } 72 | --------------------------------------------------------------------------------