Jump to content

PHP to echo ID based on date+IP?


damien275x

Recommended Posts

Hi,

 

I am looking to use PHP to create a unique order number.

I can't be bothered linking to a database etc, I am thinking creating a string of 10 characters based on current time down to the second plus a random number, or something based on the users IP address? Reduce the chances/odds someone has the exact same number. It's for a small system. Can anyone help me?

 

I want it to be about 8-10 numbers. like 20120403xxxx where xxxx is the random numbers based on IP or a random digits.

 

Thanks everyone

 

Link to comment
https://forums.phpfreaks.com/topic/263164-php-to-echo-id-based-on-dateip/
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.