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
https://forums.phpfreaks.com/topic/9777-solved-file-privacy/
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
https://forums.phpfreaks.com/topic/9777-solved-file-privacy/#findComment-36237
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
https://forums.phpfreaks.com/topic/9777-solved-file-privacy/#findComment-36312
Share on other sites

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.