![]() |
best way to generate a random string?
looking to create a string like on pastebin for the entries.
whats the best way to go about this? current way im doing is using uniqid with some other jazz Code:
function short_name( $post_name ) { |
nothign wrong with md5(uniqid());
You can maybe use microtime too |
Compile your apache with mod unique_id and let the web server care about it for you.
On high traffic servers the performance impact is almost nothing. Your solution is considerably slower than apache inique_id and will consume quite more CPU. Other than that, it's an ok solution. |
Quote:
I thik i have that module installed for expiring links. |
or you can just take a sessionid
|
All times are GMT -7. The time now is 05:46 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123