Jump to content

Anyone else ever had issues with uniqid()?


rxbanditboy1112

Recommended Posts

Every time a costumer  from another country (and sometimes from the US) comes to my website the $unique_cid = md5(uniqid(rand(),TRUE)); fails and generates a 3 digit number.... I just implemented a fix so that it checks to see if that id is already in the database but it may end up being linear and killing the whole point of this part of the program. Anyways....  Let me know if anyone else has any idea why this could possibly generate a 2-3 digit number.

 

I heard uniqid() has to do with system time. Perhaps that is the problem

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/81404-anyone-else-ever-had-issues-with-uniqid/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.