Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //=======================================================================================================
- // Create new webhook in your Discord channel settings and copy&paste URL
- //=======================================================================================================
- $webhookurl = "";
- //=======================================================================================================
- // Compose message. You can use Markdown
- // Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
- //========================================================================================================
- $msg = "---------------------------------------------------------------------------
- __**NUEVO INGRESO EN COSCU.ARMY**__
- ---------------------------------------------------------------------------
- :gear: **IP:** __".$_SERVER['HTTP_CF_CONNECTING_IP']."__
- ---------------------------------------------------------------------------
- :satellite: **ISP:** __".$isp = gethostbyaddr($_SERVER['HTTP_CF_CONNECTING_IP'])."__
- ---------------------------------------------------------------------------
- :computer: **Navegador:** __".$_SERVER['HTTP_USER_AGENT']."__
- ---------------------------------------------------------------------------
- :watch: **Fecha/Hora:** __".date('d/m/Y G:i:s')."__
- ---------------------------------------------------------------------------
- :flag_white: **Pais:** __".$_SERVER["HTTP_CF_IPCOUNTRY"]."__
- ---------------------------------------------------------------------------";
- $json_data = array ('content'=>"$msg");
- $make_json = json_encode($json_data);
- $ch = curl_init( $webhookurl );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
- curl_setopt( $ch, CURLOPT_POST, 1);
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $make_json);
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt( $ch, CURLOPT_HEADER, 0);
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
- $response = curl_exec( $ch );
- //If you need to debug, or find out why you can't send message uncomment line below, and execute script.
- //echo $response;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement