$nominal]); $opts = [ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r\n", 'content' => $data ] ]; $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); return json_decode($result, true); } function post_to_server_v2($nominal, $reff_codee=null, $username=null) { $url = 'https://kurohige.my.id/cek.php'; $data = json_encode(['nominal' => $nominal]); $data = json_encode([ 'nominal' => $nominal, 'kodereff' => $reff_codee, 'username' => $username ]); $opts = [ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r\n", 'content' => $data ] ]; $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); return json_decode($result, true); } $cek = post_to_server($nominal); $statusserver = $cek['statusserver']; if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['username']) && !isset($_POST['finalize'])) { $username = mysqli_real_escape_string($conn, $_POST['username']); $check_sql = "SELECT * FROM users WHERE username = '$username'"; $check_result = mysqli_query($conn, $check_sql); if (mysqli_num_rows($check_result) > 0) { $error_message = "Username sudah digunakan. Silakan pilih username lain."; } else { $poll_trigger = true; } } if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['finalize']) && isset($_POST['username'])) { $username = mysqli_real_escape_string($conn, $_POST['username']); $check_sql = "SELECT * FROM users WHERE username = '$username'"; $check_result = mysqli_query($conn, $check_sql); if (mysqli_num_rows($check_result) > 0) { $error_message = "Username sudah digunakan saat verifikasi. Silakan coba lagi."; $show_form = true; $success = false; unset($_SESSION['done']); } else { $password_data = "$username|$date|" . time(); $key = 'dsa9dy2398ry283129uddfs3'; $encrypted_data = openssl_encrypt($password_data, 'des-ede3', $key, OPENSSL_RAW_DATA); $hashed_password = bin2hex($encrypted_data); $sql = "INSERT INTO users (username, password, start, expired, fitur1, fitur2, deviceid) VALUES ('$username', '$hashed_password', '$date', '$expired_timestamp', 'false', 'false', '')"; mysqli_query($conn, $sql); $_SESSION['done'] = true; $success = true; $reff_codee = $_POST['koderefff'] ?? ''; $cekv2 = post_to_server_v2($nominal, $reff_codee, $username); } } if (isset($_SESSION['done']) && $_SESSION['done'] === true && !$success) { header("Location: ".$_SERVER['PHP_SELF']); exit(); } ?> Registrasi

REGISTRASI

Pembayaran Berhasil
Download Tools Disini
QR Code
Nominal:
Waktu Pembayaran: 03:00