Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.