Contact & Registration

Register your organization, request a demo, or reach our partnerships team. Verify instantly with Google Sign‑In or via email link.

Register your interest

We will send a verification link to confirm your email. Or use Google Sign‑In below for instant verification.

Verify instantly with Google

false,'error'=>'method']); exit; } function sanitize($s){ return trim(filter_var($s, FILTER_SANITIZE_SPECIAL_CHARS)); } $name = sanitize($_POST['name'] ?? ''); $email = filter_var($_POST['email'] ?? '', FILTER_VALIDATE_EMAIL); $org = sanitize($_POST['org'] ?? ''); $role = sanitize($_POST['role'] ?? ''); $phone = sanitize($_POST['phone'] ?? ''); $usecase = sanitize($_POST['usecase'] ?? ''); $message = sanitize($_POST['message'] ?? ''); if(!$name || !$email || !$org){ http_response_code(400); echo json_encode(['ok'=>false,'error'=>'missing']); exit; } $base = __DIR__ . '/data'; $pending = $base . '/pending'; $verified = $base . '/verified'; if(!is_dir($pending)) mkdir($pending, 0775, true); if(!is_dir($verified)) mkdir($verified, 0775, true); $now = gmdate('c'); $token = bin2hex(random_bytes(24)); $rec = compact('name','email','org','role','phone','usecase','message','now','token'); file_put_contents($pending."/$token.json", json_encode($rec, JSON_PRETTY_PRINT)); // Append CSV (for quick ops) $csv = fopen($base.'/registrations.csv','a'); fputcsv($csv, [$now,$name,$email,$org,$role,$phone,$usecase]); fclose($csv); // Send verification email $verifyUrl = (isset($_SERVER['HTTPS'])?'https':'http') . '://'. $_SERVER['HTTP_HOST'] . '/backend/verify_email.php?token=' . $token; // 1) Simple mail() fallback (ensure server mail is configured) $subject = 'Verify your email — TrainersEye'; $body = "Hi $name,\n\nThanks for registering with TrainersEye. Please verify your email by clicking the link below:\n$verifyUrl\n\nIf you didn't request this, ignore this message."; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]'; @mail($email, $subject, $body, $headers); // 2) (Recommended) PHPMailer SMTP — uncomment and configure /* require __DIR__.'/vendor/autoload.php'; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; $mail = new PHPMailer(true); try{ $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'YOUR_GMAIL_ADDRESS'; $mail->Password = 'YOUR_APP_PASSWORD'; // Use App Password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; $mail->setFrom('[email protected]','TrainersEye'); $mail->addAddress($email, $name); $mail->Subject = $subject; $mail->Body = $body; $mail->send(); }catch(Exception $e){ /* log error */ } */ echo json_encode(['ok'=>true,'sent'=>true]); ?> Verification — TrainersEye

Verification

Back to site

false]); exit; } // Verify via Google tokeninfo endpoint $resp = @file_get_contents('https://oauth2.googleapis.com/tokeninfo?id_token=' . urlencode($idToken)); if(!$resp){ http_response_code(401); echo json_encode(['ok'=>false]); exit; } $data = json_decode($resp, true); // You MUST check aud (client_id) matches YOUR_GOOGLE_CLIENT_ID and that email_verified is true $audOk = isset($data['aud']) && $data['aud'] === 'YOUR_GOOGLE_CLIENT_ID'; if(!$audOk || empty($data['email_verified'])){ http_response_code(401); echo json_encode(['ok'=>false]); exit; } // Save a lightweight verified record $base = __DIR__ . '/data'; if(!is_dir($base)) mkdir($base,0775,true); $vf = $base . '/google_verified.csv'; $csv = fopen($vf,'a'); fputcsv($csv, [gmdate('c'), $data['email'] ?? '', $data['name'] ?? '', $data['sub'] ?? '']); fclose($csv); echo json_encode(['ok'=>true]); ?> # Deny access to data directory Require all denied # Prevent PHP execution inside /backend/data php_admin_flag engine off