Create FTP account through PHP.....
Moderator: General Moderators
Create FTP account through PHP.....
Ive searched and ive searched, from google to php.net to forums, and i cant seem to find anything.
I know I can make a webbased ftp, thats easy, but not what I want. I would like that when the users signup it creates a new FTP account for them.
Ive found things such as a "helper" program thats running as root, or modifying the PHP config file (wich i dont seem to have)...but nothing specific. And when i search for those, I can pull anything up.
Btw im using a FileZillaFTP server
thanks if you can help
I know I can make a webbased ftp, thats easy, but not what I want. I would like that when the users signup it creates a new FTP account for them.
Ive found things such as a "helper" program thats running as root, or modifying the PHP config file (wich i dont seem to have)...but nothing specific. And when i search for those, I can pull anything up.
Btw im using a FileZillaFTP server
thanks if you can help
Not 100% sure but my guess would be that:
FTP accounts are stored in like.. a file on the server that your php scripts can't access.. I think something special has to be installed on the server for PHP scripts to be able to add ftp accounts & stuff.. Like stuff installed on servers with control panels for webhosting etc.
FTP accounts are stored in like.. a file on the server that your php scripts can't access.. I think something special has to be installed on the server for PHP scripts to be able to add ftp accounts & stuff.. Like stuff installed on servers with control panels for webhosting etc.
yea
yea, thats what im trying to do, make a webhost. I have found things like zpanel and cpanel and all that stuff, but i want to make my own. I have it all down except for the creation of a ftp account.
if anything ill resort to making a web-based ftp....but i dont realy want to.
if anything ill resort to making a web-based ftp....but i dont realy want to.
Get web server software that supports it.. Or make your own its not really hard.. You can make a web server that supports PHP etc in Visual Basic. Then make a php function or something to add an FTP account, and that makes the webserver write the new account in the accounts database/registry/file/whatever.
yes....
i already have a server set up with PHP CGI MySQL all the good stuff. I have the FileZilla FTP server up as well
what im trying to do is build a control panel for the host, i have everything i need, i just dont know how I can create an FTP account when a user signs up.
im probly just gonna make a web based file manager, i dont seem to be getting anywere
and i dont have a config file for the FTP, and if i do, then its not in the same folder as the rest of the ftp stuff.
what im trying to do is build a control panel for the host, i have everything i need, i just dont know how I can create an FTP account when a user signs up.
im probly just gonna make a web based file manager, i dont seem to be getting anywere
and i dont have a config file for the FTP, and if i do, then its not in the same folder as the rest of the ftp stuff.
First of all... find the file that your FTP accounts are created in. If you're running a win32 system it will most likely be a *.ini file. Then, you have to set the permissions to allow the IUSR_<computer_name> account to access that (again, under win32). PHP will then be able to modify the file. You will have to access it through the full path name though (ex: D:\ftp\users.ini) and you shouldn't have a problem. You can most likely use the parse_ini_file() function to do it.
I hope that helped a little
I hope that helped a little
You can use the regular file editing functions (fopen, fwrite, fclose, fread, etc.)... but make sure PHP has permission to edit the file, if it doesn't you're going to get permission denied errors.
If you want to read the accounts, you could either write your own XML parsing class (using mostly ereg) or use another XML function.
Goodluck
If you want to read the accounts, you could either write your own XML parsing class (using mostly ereg) or use another XML function.
Goodluck