OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
quiz
/
backup
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📁
assets
-
02/15/2025 11:20:34 AM
rwxr-xr-x
📄
bregister.php
15.32 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
callback.php
871 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📄
child_registration.php
9.47 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
dashboard copy.php
6.72 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
dashboard.php
5.94 KB
05/19/2025 10:07:16 AM
rw-r--r--
📁
data
-
02/15/2025 11:20:32 AM
rwxr-xr-x
📄
function.php
5.06 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
index.php
4.64 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
oauth.php
355 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📁
old_backup
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📁
payment
-
02/15/2025 11:20:34 AM
rwxr-xr-x
📄
payment.php
3.67 KB
05/19/2025 10:07:16 AM
rw-r--r--
📁
process
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📄
register.php
10.96 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
sendOtp.php
2.32 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
styles.css
0 bytes
02/15/2025 11:21:44 AM
rw-r--r--
📄
subscription_check.php
1.39 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
verify.php
2.23 KB
05/19/2025 10:07:16 AM
rw-r--r--
Editing: sendOtp.php
Close
<?php include 'assets/php/validate.logged.php'; // Include your email or SMS sending library use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; // If using PHPMailer via Composer (for email) if ($_SERVER['REQUEST_METHOD'] == 'POST') { $type = $_POST['type']; // Type: 'email' or 'sms' $otp = rand(100000, 999999); // Generate a 6-digit OTP // Store OTP in session for verification later $_SESSION['otp'] = $otp; if ($type == 'email') { $email = $_POST['email']; // Send OTP via email using PHPMailer try { $mail = new PHPMailer(true); $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; // Set the SMTP server (example: Gmail) $mail->SMTPAuth = true; $mail->Username = 'your-email@gmail.com'; // Your email $mail->Password = 'your-email-password'; // Your email password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; $mail->setFrom('your-email@gmail.com', 'Your Name'); $mail->addAddress($email); // Add recipient email $mail->isHTML(true); $mail->Subject = 'Your OTP Code'; $mail->Body = 'Your OTP code is: ' . $otp; $mail->send(); echo json_encode(['success' => true]); } catch (Exception $e) { echo json_encode(['success' => false, 'message' => $mail->ErrorInfo]); } } elseif ($type == 'sms') { $mobile = $_POST['mobile']; // Send OTP via SMS (using a service like Twilio) $sid = 'your-twilio-sid'; $token = 'your-twilio-auth-token'; $from = 'your-twilio-number'; $to = $mobile; // Twilio API call $client = new \Twilio\Rest\Client($sid, $token); try { $client->messages->create( $to, // To number [ 'from' => $from, // Twilio number 'body' => 'Your OTP code is: ' . $otp, ] ); echo json_encode(['success' => true]); } catch (Exception $e) { echo json_encode(['success' => false, 'message' => $e->getMessage()]); } } } ?>