Zubrag.com :: Forum

zubrag.com => cPanel Scripts => Topic started by: EvilHomeR on September 13, 2007, 08:11:55 AM



Title: WHM account creator: running from other scripts
Post by: EvilHomeR on September 13, 2007, 08:11:55 AM
Hi first off fantastic script

Can this script be used to auto create accounts using other software?

eg shopping cart software? So customer goes to site, places order and pays via paypal etc. Once paid and transfered back is there a way to get the script to run in background so store admin does not have to fill in form?

If it can how would it be done? what would I need to do

Thank you in advance for any help in this matter


Title: Re: WHM account creator - running from other scripts
Post by: zubrag on September 13, 2007, 10:20:17 AM
WHM Account Creator (http://www.zubrag.com/scripts/create-cpanel-whm-account.php) script can also be run from another PHP script. This may be helpful if you have some user interface already in place and want to automatically create WHM accounts from there.
In this case you have to setup following variables instead of passing them as parameters:
- $user_domain - new account domain
- $user_name - new account username
- $user_pass - new account password
- $user_plan - new account hosting package (plan)
- $user_email - contact email

For example you add following php code to your shopping cart software, after payment made:

$user_domain = domain;
$user_name = username;
$user_pass = password;
$user_plan = package;
$user_email = contact email;
include('create-whm-account.php');

Values in bold have to taken from your shopping cart software.


Title: Re: WHM account creator: running from other scripts
Post by: EvilHomeR on September 13, 2007, 02:34:13 PM
so you mean after returned from gateway? eg confirmed.php page


Title: Re: WHM account creator: running from other scripts
Post by: zubrag on September 14, 2007, 03:53:48 AM
yes, i would place code after payment confirmation.