The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Generate random key
I haven't figured out yet how to generate a random key that consists of letters and numbers. I managed to get it to generate numbers but for the life of me I can't seem to figure out how to generate a random alphanumeric key.
Here is what I am using for numeric only: PHP Code:
Any help greatly appreciated EDIT: Also, I have read quite a few articles on php.net but alas have come up empty handed. Thanks in advance Steve M |
#2
|
|||
|
|||
This page should help you.
http://www.i-fubar.com/random-string-generator.php |
#3
|
|||
|
|||
Is the link a joke? 2 lines are enough:
PHP Code:
|
#4
|
|||
|
|||
Thanks MoT3rror and Hossie.
Hossie, what you gave me worked but it gave me a 16 letter string. I need it to be a mix of letters and numbers. |
#5
|
|||
|
|||
So why don't you just use some hash algorithm?
PHP Code:
|
#6
|
|||
|
|||
Perfect, thats what I was trying to figure out last night but couldn't. You just saved me a headache Hossie. Thanks.
That link above though seemed good but alot of lines of code. Glad you made a post. |
#7
|
|||
|
|||
You must not have read the first part of the page.
PHP Code:
The second funtion. PHP Code:
Call on this to come with 16. PHP Code:
|
#8
|
|||
|
|||
Using one of the hashing algorithms would be the most efficient solution - that is what hashing is for.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|