Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
best random string generator
SUBMITTED BY:
admaster
DATE:
Nov. 4, 2015, 2:49 p.m.
FORMAT:
PHP
SIZE:
327 Bytes
Raw
Download
Tweet
HITS:
18578
Go to comments
Report
<?php
function
id
()
{
// add limit
$id_length
=
20
;
// add any character / digit
$alfa
=
"abcdefghijklmnopqrstuvwxyz1234567890"
;
$token
=
""
;
for
(
$i
=
1
;
$i
<
$id_length
;
$i
++
)
{
// generate randomly within given character/digits
@
$token
.=
$alfa
[
rand
(
1
,
strlen
(
$alfa
))];
}
return
$token
;
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus