note 124635 added to function.com-create-guid

From: Date: Wed, 22 Jan 2020 14:26:27 +0000
Subject: note 124635 added to function.com-create-guid
Groups: php.notes 
Request: Send a blank email to php-notes+get-213939@lists.php.net to get a copy of this message
function create_guid() { // Create GUID (Globally Unique Identifier) $guid = ''; $namespace = rand(11111, 99999); $uid = uniqid('', true); $data = $namespace; $data .= $_SERVER['REQUEST_TIME']; $data .= $_SERVER['HTTP_USER_AGENT']; $data .= $_SERVER['REMOTE_ADDR']; $data .= $_SERVER['REMOTE_PORT']; $hash = strtoupper(hash('ripemd128', $uid . $guid . md5($data))); $guid = substr($hash, 0, 8) . '-' . substr($hash, 8, 4) . '-' . substr($hash, 12, 4) . '-' . substr($hash, 16, 4) . '-' . substr($hash, 20, 12); return $guid; } ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.172 (proxied: 2003:de:472e:7c00:b139:d3cb:5ae9:4dcb) ---- Manual Page -- http://php.net/manual/en/function.com-create-guid.php Edit -- https://master.php.net/note/edit/124635 Del: integrated -- https://master.php.net/note/delete/124635/integrated Del: useless -- https://master.php.net/note/delete/124635/useless Del: bad code -- https://master.php.net/note/delete/124635/bad+code Del: spam -- https://master.php.net/note/delete/124635/spam Del: non-english -- https://master.php.net/note/delete/124635/non-english Del: in docs -- https://master.php.net/note/delete/124635/in+docs Del: other reasons-- https://master.php.net/note/delete/124635 Reject -- https://master.php.net/note/reject/124635 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#213939) next »