17 lines
492 B
PHP
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();
|
|
}
|
|
?>
|