Skip to content

Instantly share code, notes, and snippets.

@haxpor
Last active January 23, 2026 01:31
Show Gist options
  • Select an option

  • Save haxpor/1b86041f3fd0c7e440893dfae3b6b1a6 to your computer and use it in GitHub Desktop.

Select an option

Save haxpor/1b86041f3fd0c7e440893dfae3b6b1a6 to your computer and use it in GitHub Desktop.
How to set webhook url for bot on Telegram
https://api.telegram.org/bot<bot-token>/setWebhook?url=<webhook-url>
<bot-token> - bot token get from BotFather on Telegram
<webhook-url> - webhook url in base64
@muradsheikh8020-a11y
Copy link

query("INSERT IGNORE INTO users (user_id) VALUES ('$user_id')"); function sendMessage($chat_id, $msg, $keyboard=null){ global $apiURL; $data = [ 'chat_id'=>$chat_id, 'text'=>$msg, 'parse_mode'=>'HTML' ]; if($keyboard){ $data['reply_markup'] = json_encode($keyboard); } file_get_contents($apiURL."sendMessage?".http_build_query($data)); } $menu = [ 'keyboard'=>[ ['πŸ’° Balance','βž• Add Balance'], ['πŸ›’ Buy Service','πŸ“‹ Price List'] ], 'resize_keyboard'=>true ]; if($text=="/start"){ sendMessage($chat_id, "πŸ€– Welcome to Social Booster Pro\n\nChoose optionπŸ‘‡", $menu); } elseif($text=="πŸ’° Balance"){ $q=$conn->query("SELECT balance FROM users WHERE user_id='$user_id'"); $b=$q->fetch_assoc()['balance']; sendMessage($chat_id,"πŸ’° Your Balance: $b tk"); } elseif($text=="πŸ“‹ Price List"){ sendMessage($chat_id, "πŸ“Œ Service Price List\n πŸ‘€ Profile Follow 1k = 40 tk πŸŽ₯ Video Views 1k = 25 tk 🎞 Reel Views 1k = 20 tk πŸ‘ Post Reaction 1k = 35 tk πŸ’¬ Low Comment 1k = 50 tk"); } elseif($text=="βž• Add Balance"){ sendMessage($chat_id, "πŸ’³ Payment Method\n πŸ“² Bkash: 019XXXXXXXX πŸ“² Nagad: 019XXXXXXXX\n Send screenshot & Txn ID"); } elseif($text=="πŸ›’ Buy Service"){ sendMessage($chat_id, "πŸ›’ Order System Coming Soon\n(Admin API connect করঀে হবে)"); }

@muradsheikh8020-a11y
Copy link

/start
/newbot
Bot Name: Social Booster Pro
Username: social_boosterpro_bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment