Example #1
0
 /**
  * @return string
  */
 protected function _getMachineId()
 {
     // Global machine-id from systemd https://www.freedesktop.org/software/systemd/man/machine-id.html
     $file = new CM_File('/etc/machine-id');
     if (!$file->exists()) {
         // Local machine-id as a backup
         $serviceManager = CM_Service_Manager::getInstance();
         $file = new CM_File('machine-id', $serviceManager->getFilesystems()->getData());
         if (!$file->exists()) {
             $uuid = Ramsey\Uuid\Uuid::uuid4()->toString();
             $file->write($uuid);
         }
     }
     return trim($file->read());
 }
Example #2
0
function uuid()
{
    return Ramsey\Uuid\Uuid::uuid4()->toString();
}
                <th>Plate No</th>
                <th>Chases No</th>
                <th>No of Sitter</th>
                <th>Bus Color</th>
                <th ></th>
                <th ></th>
            </tr>
            </tfoot>
        </table>


        <?php 
echo \SimpleSoftwareIO\QrCode\Facades\QrCode::size(100)->generate("Amedora33") . "<br>";
?>
        <?php 
$uuid1 = Ramsey\Uuid\Uuid::uuid5(Ramsey\Uuid\Uuid::NAMESPACE_DNS, 'Amedora33');
echo $uuid1->toString() . "<br>";
?>
        <?php 
echo strtoupper(uniqid()) . "<br>";
?>
        <?php 
printf("uniqid('php_'): %s\r\n", uniqid('php_'));
?>
    </div><!-- /.box-body -->
</div><!-- /.box -->