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.

Member Avatar

This is a help forum not a gimme code hangout. Show what you.ve done. Give more info as in the length etc

commented: This is a satisfying and suitable response. +11

Given below is the function I used to generate apikeys. May be you are searching for this. Please remove 'md5' if you dont want letters in the string. Also please try to give more info as like diafol mentioned above.

function generateApiKey() {
     return md5(uniqid(rand(), true));
   }