Jump to content

[SOLVED] file privacy


corillo181

Recommended Posts

lets say i have a folder for ppl to upload picture and then be able to view only their pictures..

but you know when you look at a picture url it gives out where the picture is located and if the user remove the photo name they go derectly to the directory and are able to see all the pictures in it.. how can this be aviod..

and if is pissible how do i change the name of the file been uploaded.. i traid rand()=num.$name.. but this only adds the amount of numbe ri want to the file and keeps the same name.. i want to change the whole name..


thanx for any one who help me with this..
Link to comment
Share on other sites

[!--quoteo(post=374278:date=May 16 2006, 04:05 PM:name=Richard181)--][div class=\'quotetop\']QUOTE(Richard181 @ May 16 2006, 04:05 PM) [snapback]374278[/snapback][/div][div class=\'quotemain\'][!--quotec--]
but you know when you look at a picture url it gives out where the picture is located and if the user remove the photo name they go derectly to the directory and are able to see all the pictures in it.. how can this be aviod..
[/quote]

add a index.php file. this file can be blank, or can redirect a user to your home page. That way, users can't get the contents of a directory, because the php file gets executed.
Link to comment
Share on other sites

[!--quoteo(post=374343:date=May 16 2006, 01:07 PM:name=ryanlwh)--][div class=\'quotetop\']QUOTE(ryanlwh @ May 16 2006, 01:07 PM) [snapback]374343[/snapback][/div][div class=\'quotemain\'][!--quotec--]
are you going to store the new filenames into the db? maybe you can change the filename into USERID.PIC#
[/quote]


yes it is both going to a database and a directory..
Link to comment
Share on other sites

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.