PHP FTP Upload Form

lordtron

New Member
Messages
85
Reaction score
0
Points
0
I would like for users that upload files with this form to be able to create a directory for there files. So if someone could please help me with create a text area or something for this reason.
 

Attachments

  • upload.html
    4.7 KB · Views: 103

Adam01

New Member
Messages
114
Reaction score
0
Points
0
I made a ftp uploader, but I took it off due to it being disallowed by the tos.
It needs to be a php extention.

The thing is, I could never make it download from ftp.
 

lordtron

New Member
Messages
85
Reaction score
0
Points
0
Yeah I know it needs to be a PHP extension. But due to limited upload file types, I just uploaded it as a HTML file so that people can check it out.

But I need a ftp uploader that allows clients to create the folder that there uploaded content will go in.
 

altrock182182

New Member
Messages
40
Reaction score
0
Points
0
PHP:
bool mkdir ( string $pathname [, int $mode [, bool $recursive [, resource $context ]]] )

This should help you. Create another box in your upload form that allows them to specifiy their directory.

I would suggest not allowing slashes or periods, and make sure those are filtered out, as it can lead to security issues very quickly.

Basically take $_POST['newdir'], where newdir is the name of the object in the form, and use mkdir to make the directory. After that you'll just have to decide how you want to prevent other users from accessing the wrong directories.

Oh, I'm assuming you know how to code PHP.. if you don't, you have very little chance of this succeeding without alot of help.
 

Adam01

New Member
Messages
114
Reaction score
0
Points
0
My one created a user's directory in the home/uploads/ directory.
And users can only see what they'd uploaded. If your on free hosting, its against the tos - public upload service.

The way it downloaded, it downloaded the files to the directory the php file was running in. I could see if I could make it copy the file to a directory in html/download , and then make a cron job that deleted all the files in the download directory every 5 minutes.
 

lordtron

New Member
Messages
85
Reaction score
0
Points
0
Oh its not a public upload service. Only a few people have access to the upload form.


But I will try to do what altrock said...hopefully that work work out....
Edit:
Yeah, that did not work for me at all, it just stared at me. I will need some extra help with this one. So any help would be greatly needed
 
Last edited:
Top