Jump to content

Very basic question: Resticted access to a folder on server.


tabbu

Recommended Posts

Hi all,

 

For being newbie in PHP I want to ask is it possible to give our client a username, password and with them have access for example to: ../clientX/workfile.zip. I would like to find a code that I can insert three variables:

 

1) User

2) Password

3) FTP-folder address where user can go and get the files.

 

That way all of our co-workers can use it without any knowledge of PHP. When they have their project ready, they can upload it to server and send login information to client by email.

 

I have searched and googled but I haven't found any good tools for this. But is this possible with PHP? Or should I look for other options? Are there any commercial tools for this?

 

Thank you for your time and I appreciate all the answers you can give me!

 

Br,

Tabbu

http://us3.php.net/chmod

<?php
$ftp_server='server';
$conn_id = ftp_connect("$ftp_server");
ftp_login($conn_id, user, password);
ftp_mkdir($conn_id, dir/dir);
ftp_site($conn_id, 'CHMOD 777, dir/dir');
ftp_close($conn_id);
?> 

are you using a database mate........

 

I'm not using anything at the moment, because I'm still planning this system :) I can use database however if it is needed.

 

Ps. Thanks for the code. That seems to be somewhat right for me. Now if I just would understand something about PHP code ;)

 

Br,

Tabbu

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.