Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. <?php
  2.  
  3. //=======================================================================================================
  4. // Create new webhook in your Discord channel settings and copy&paste URL
  5. //=======================================================================================================
  6. $webhookurl = "";
  7. //=======================================================================================================
  8. // Compose message. You can use Markdown
  9. // Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
  10. //========================================================================================================
  11. $msg = "---------------------------------------------------------------------------
  12. __**NUEVO INGRESO EN COSCU.ARMY**__
  13. ---------------------------------------------------------------------------
  14. :gear: **IP:** __".$_SERVER['HTTP_CF_CONNECTING_IP']."__
  15. ---------------------------------------------------------------------------
  16. :satellite: **ISP:** __".$isp = gethostbyaddr($_SERVER['HTTP_CF_CONNECTING_IP'])."__
  17. ---------------------------------------------------------------------------
  18. :computer: **Navegador:** __".$_SERVER['HTTP_USER_AGENT']."__
  19. ---------------------------------------------------------------------------
  20. :watch: **Fecha/Hora:** __".date('d/m/Y G:i:s')."__
  21. ---------------------------------------------------------------------------
  22. :flag_white: **Pais:** __".$_SERVER["HTTP_CF_IPCOUNTRY"]."__
  23. ---------------------------------------------------------------------------";
  24. $json_data = array ('content'=>"$msg");
  25. $make_json = json_encode($json_data);
  26. $ch = curl_init( $webhookurl );
  27. curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
  28. curl_setopt( $ch, CURLOPT_POST, 1);
  29. curl_setopt( $ch, CURLOPT_POSTFIELDS, $make_json);
  30. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
  31. curl_setopt( $ch, CURLOPT_HEADER, 0);
  32. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
  33. $response = curl_exec( $ch );
  34. //If you need to debug, or find out why you can't send message uncomment line below, and execute script.
  35. //echo $response;
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement