34729-vm/utils.php
Flatlogic Bot 9dd9dcbc9d 2
2025-10-06 16:25:16 +00:00

17 lines
492 B
PHP

<?php
function generateSimpleId() {
// Generates a random 4-digit number with a prefix
return 'U' . str_pad(random_int(0, 9999), 4, '0', STR_PAD_LEFT);
}
function generateUltraId() {
// Generates a more complex, unique ID using random bytes for better uniqueness
return 'ULTRA-' . strtoupper(bin2hex(random_bytes(3))) . '-' . strtoupper(bin2hex(random_bytes(3)));
}
// Function to redirect and exit
function redirect($url) {
header('Location: ' . $url);
exit();
}
?>