I want to know what strategy should i use to generate a random URL for my users uploaded pictures. I dont think str_shuffle is a good option, because it consumes a lot of memory ( am i wrong )? Please give me some tips for this kind of situation.
Thanks.
$random = uniqid();
$url = "http://www.example.com/?v=$random";
echo $url;
The output will look something like: http://www.example.com/?v=4b3403665fea8
You would then save $random
in a database for future use ;)