How to generate unique key of random numbers in PHP

General discussion on PHP

How to generate unique key of random numbers in PHP

Postby ashi4275 on Mon Oct 17, 2016 11:10 am

Hi, I am looking for some example code that can help me to generate unique random string of numeric numbers in PHP Applications. I am hoping to resolve this issue with the help of tech developers working around & for this I have researched for many php questions & answers in various forums, but didn't get any satisfactory response. Hoping to get answer here.
ashi4275
 
Posts: 15
Joined: Fri Jul 15, 2016 10:02 am

Re: How to generate unique key of random numbers in PHP

Postby zvika on Tue Oct 25, 2016 9:58 am

You have another question of same type: viewtopic.php?f=63&t=131588
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 983
Joined: Sun Dec 14, 2008 9:48 am

Re: How to generate unique key of random numbers in PHP

Postby app7201 on Thu May 11, 2017 12:54 pm

you should choose Scott as the correct answer. Scott is using OpenSSL's cryptographically secure psudo-random number generator (CSPRNG) which will choose the most secure source of entropy based on your platform
app7201
 
Posts: 2
Joined: Thu May 11, 2017 12:51 pm


Return to PHP

Who is online

Users browsing this forum: No registered users and 1 guest