desjardins2010 Posted January 8, 2011 Share Posted January 8, 2011 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 More sharing options...
QuickOldCar Posted January 8, 2011 Share Posted January 8, 2011 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 Link to comment https://forums.phpfreaks.com/topic/223742-someone-might-know-how/#findComment-1156539 Share on other sites More sharing options...
desjardins2010 Posted January 8, 2011 Author Share Posted January 8, 2011 thanks man... appreciate the input Link to comment https://forums.phpfreaks.com/topic/223742-someone-might-know-how/#findComment-1156700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.