Skip to content

Instantly share code, notes, and snippets.

@mcunha98
Created June 15, 2022 13:05
Show Gist options
  • Save mcunha98/8c5cc9f48a595978627d6ce99e74fd08 to your computer and use it in GitHub Desktop.
Save mcunha98/8c5cc9f48a595978627d6ce99e74fd08 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<body>
<?php
for ($i = 1; $i <= 10; $i++)
{
echo guid() . "<br>";
}
function guid()
{
$base = md5(uniqid() . time() . rand(1000,9999));
return substr($base,0,8) . "-" . substr($base,8,4) . "-" . substr($base,12,4) . "-" . substr($base,16,4) . "-" . substr($base,20,12);
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment