• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random chars for file name?

#1
[eluser]stuffradio[/eluser]
I am making a public photo sharing type site. It is for a client, and I am trying to be as secure as possible to also prevent hot linking, etc.

What would you say is the best method for file naming when they upload the image?

Method:
The user goes to the site, logs in to their account.

They go to the upload page, enters the caption, whether or not it's nsfw (There is a report button if it is not appropriate if it's marked as sfw)

When it's uploaded, it gets put in to a folder.

The user can also email the photo, and it gets uploaded.

End Method;

That's a bit of insight as to how it works. What's the best method for randomizing the file names and making sure it doesn't exist?

#2
[eluser]SpooF[/eluser]
The fastest and easiest way would go turn on encrypt_name when your load the image library.

Code:
$config['encrypt_name'] = true;

More Info

#3
[eluser]stuffradio[/eluser]
I will look, thanks.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.