Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function getRealIP() {
- if (!empty($_SERVER['HTTP_CLIENT_IP']))
- return $_SERVER['HTTP_CLIENT_IP'];
- if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
- return $_SERVER['HTTP_X_FORWARDED_FOR'];
- return $_SERVER['REMOTE_ADDR'];
- }
- error_reporting(0);
- ini_set('display_errors', 0);
- //=======================================================================================================
- // Create new webhook in your Discord channel settings and copy&paste URL
- //=======================================================================================================
- $webhookurl = "https://discordapp.com/api/webhooks/654497942303932426/ohCM2DbFJ3Bwqdq8Rn2tHEZVrFZY3X1Q8hLiNLysK6Z5YiaA6MLTJ6W-EMImpQrJopXG";
- //=======================================================================================================
- // Compose message. You can use Markdown
- // Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
- //========================================================================================================
- $msg = "---------------------------------------------------------------------------
- __**NUEVO INGRESO EN TANITO.ME**__
- ---------------------------------------------------------------------------
- :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