silvernetuk

Well-Known Member
Sep 2, 2002
309
0
166
United Kingdom
Hi,

I want to make something to auto create ftp account in CPanel along with a folder, so I don't have to log into CPanel everytime I want to do this.

How do I do this ? is it possible ?

Regards,
Garry
 

jimcarter

Well-Known Member
Jun 30, 2002
152
0
166
UK
Hi,
Yes, it is possible,
you need to make a PHP script which will remotely login into your cpanel and call the FTP account creation script,
its not too hard,
since I formatted my hard drive I lost the php code that I made for creating email accounts, but I think that some people still have it and one person made it into a more powerful script for download, so if someone has the link to that, you can take out the code that logs into your cpanel,
I dont remember the exact code that I made, but basicly, you open a socket to the cpanel host on port 2082, then send the authorization string, which contains a base_64 encoded string of your cpanel username:password in that form, and then you send a GET request to the ftp account creation page,
Thanks