English 中文(简体)
缩略语
原标题:A shorter UUID, ASCII85 with PHP

我读到UUID v4,它几乎是独一无二的,这符合我的需要。 问题在于,其数量太大,能否产生像Facebook或Twitter这样的UUID,其性质要少?

I read some post, where you can shrink this code to 20 with Ascii85, but don t see a reliable PHP script doing the job. Someone knows a tested class?? for random ID s it the best way to store this 20 char, right?

纽约总部 Edit -

@ David Schwartz

感谢。 在单一服务器中,我需要随机独特的识别标志,在8至16个焦炭中(如果是最低的,20个是罚款的)。 它将确定带可读的IDS但NOT增量(第一 ob1 000,第二千2美元)、第542A4B243J、C63426KJ70、O30V4U1I9P等的斜体。 该系统必须成为(至少)6个MySQL表格的主要钥匙。 在同一个服务器上安装了PHP式喷气机。

@ta.speot.is

我写了“看看一看能够胜任工作的可靠手稿”。 有些人知道一个经过测试的类别?” 我看不出,看上去的所有法典都经过测试,你们是否测试了所有的链接?

@sarnold

感谢,但Im 则表示不理解好吗?

问题回答

在我所投入的企业项目上,我面临着同样的问题,我无法找到一种经过测试的快速解决方案。 因此,我决定写一份PHP延伸版,用于编码/编码数据,编号为85/ascii85。

You can check it out here: https://github.com/miezuit/php-base85

它使用一套自动测试进行测试。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签