*

Site Map

ShoutBox!

-no content-

Author Topic: cPanel: email account creation. I need help making a PHP script.  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Offline Holiday

Hey I have a website ( http://www.ppltalkin.com/ ) and the administration panel is powered by cPanel.
I want my members to be able to apply for an email address and have one automatically created for them on the spot!

I have squirrel mail installed and I have a cPanel password changer plug-in installed for squirrel mail.
I have tried to copy the code from the plug-in, change it a little and use it on a PHP/HTML page, however the script was heavy made to be integrated with squirrel mail, and sense my knowledge of PHP isn't that great, I'm having a hard time redesigning the script :(

Here's what the script does:

if I open my web browser and login to my cpanel account, then type
Code: [Select]
http://ppltalkin.com:2082/frontend/x3/mail/dopasswdpop.html?email=user1&domain=ppltalkin.com&password=123testing&quota=25 in the address bar, I have just created the email account user1, with the password 123testing and 25MB of mail space.

the script does the same thing accept instead of creating an email account, it will change the password of an existing account.

cPanel is located in a password protected directory of the server, so if I enter
Code: [Select]
http://ppltalkin.com:2082/frontend/x3/mail/dopasswdpop.html?email=user1&domain=ppltalkin.com&password=123testing&quota=25in the address bar with out logging in first it will prompt me for a user name and password, and if I submit the username and password it will do the same has if I was logged in.
So what I need is a page that is a PHP html mix, that has a field for the new account name a password field, a password confirm field and a submit button.
The the php script would just collect the info from the fields, some how send
Code: [Select]
http://ppltalkin.com:2082/frontend/x3/mail/dopasswdpop.html?email=user1&domain=ppltalkin.com&password=123testing&quota=25 to the site and login.

However I'm not sure how to submit
Code: [Select]
http://ppltalkin.com:2082/frontend/x3/mail/dopasswdpop.html?email=user1&domain=ppltalkin.com&password=123testing&quota=25 to the site without actually taking the user to the site and I'm also not sure how to login with the php script.

HERE is the cPanel password changer plug-in http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcpanel_pw_changer.1.3-1.3.tar.gz (it is written in PHP)

Any and all help would be greatly appreciated!

Thanks,
Holiday.
Sir bug finder :P
Win XP Pro\Win Vista beta 1
3.00 GHz Intel Pentium 4 Processor With HT
NVIDIA GeForce FX 5200
1536MB(1.5GB) DDR PC2700 RAM 2x256+2x512
160GB DMA HD + 250GB Maxtor HD :D
BLASTER Live! 24.bit 96kHz/100dB SNR HD
SONY Double Layer DVD Writer DRU-720A
HP DVD+R\RW DVD Writer
LCD 19" Flat panel f1903

AIM screen name HolidayrekcaH
Laptop specs

Offline Kyle

Re: cPanel: email account creation. I need help making a PHP script.
« Reply #1 on: August 21, 2006, 05:39:50 PM »
What host are you using? Depending on how they said up the permisions for everything, its possible the only way to do it would be very insecure. (Which is why im asking, hoping there will be some mention of it all on there website)
AMD X2 6000+
XFX Nforce 590 SLI
Geforce 8800GS
OCz Reaper 2GB DDR800

Offline Holiday

Re: cPanel: email account creation. I need help making a PHP script.
« Reply #2 on: August 21, 2006, 07:46:30 PM »
What host are you using? Depending on how they said up the permisions for everything, its possible the only way to do it would be very insecure. (Which is why im asking, hoping there will be some mention of it all on there website)

Man, you're gonna have to talk a little clearer, and why would it matter who my host is? It's a cPanel administration.

And if it's unsecure who cares  :)
Sir bug finder :P
Win XP Pro\Win Vista beta 1
3.00 GHz Intel Pentium 4 Processor With HT
NVIDIA GeForce FX 5200
1536MB(1.5GB) DDR PC2700 RAM 2x256+2x512
160GB DMA HD + 250GB Maxtor HD :D
BLASTER Live! 24.bit 96kHz/100dB SNR HD
SONY Double Layer DVD Writer DRU-720A
HP DVD+R\RW DVD Writer
LCD 19" Flat panel f1903

AIM screen name HolidayrekcaH
Laptop specs

Offline Kyle

Re: cPanel: email account creation. I need help making a PHP script.
« Reply #3 on: August 21, 2006, 08:40:22 PM »
Cpanel can be set up differently on different servers....

Can you go directly to Squirlmail or Hord directly without logging into your acount?
« Last Edit: August 21, 2006, 10:00:38 PM by Kyle »
AMD X2 6000+
XFX Nforce 590 SLI
Geforce 8800GS
OCz Reaper 2GB DDR800

Offline Kyle

Re: cPanel: email account creation. I need help making a PHP script.
« Reply #4 on: March 01, 2010, 02:21:18 AM »
hm..... 4 years later =p.

did you by chance ever figure this out, Holiday? I would be interested in something similar to this.
AMD X2 6000+
XFX Nforce 590 SLI
Geforce 8800GS
OCz Reaper 2GB DDR800