Jump to content

someone might know how...


desjardins2010

Recommended Posts

hey guys.. quick question any know how I can create a list of random file names but that actually make sense not just akdjfds.bin i want to use 4 different extensions .exe - .bin - .txt - .eml

 

if you been following and helping me to now you know i'm making an online virtual hacking simulation and I need to fill npcs with files... so users can snoop though something to find the actual file they are sent in looking for... after all it would be very interesting if the file they need was the only one there.. :) and maybe a way to add folders... hmmm some feedback here would be great..! thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/223742-someone-might-know-how/
Share on other sites

The best thing you can do is populate a database field full of file names and select the desired amount at random within the select statement.

 

I tried numerous ways doing by text files, generating and merging random words, even just mixing words randomly from text files, all these solutions are memory and cpu intensive.

 

This at the end in the mysql select is the best way

order by rand() LIMIT 5

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.