Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- $whm_interface_path = '/usr/local/cpanel/Cpanel/Accounting.php.inc';
- function getVar($name, $def = '') {
- if (isset($_REQUEST[$name]))
- return $_REQUEST[$name];
- else
- return $def;
- }
- ?>
- <?php
- $host = "88.198.6.198";
- $user = "tbrfhakd";
- $accesshash = 'hash';
- require_once $whm_interface_path;
- $accts = listpkgs($host,$user,$accesshash,1);
- ?>
- <html>
- <title>Cpanel Account Creator</title>
- <body style="background-color:black"></body></html>
- <head>
- <font color=white><b>Cpanel account creator v2.2</b></font>
- <br/>
- <br/>
- <form method="post">
- <table border="0">
- <tr><td><font color=white>Domain:</font></td><td><input style="color:lime;background-color:#000000" name="domain" value=""></td></tr>
- <tr><td><font color=white>Username:</font></td><td><input style="color:lime;background-color:#000000" name="username" value=""></td></tr>
- </table>
- <br/><font color=white>Package:</font>
- <br/>
- <select
- style="color:lime;background-color:#000000" name="package">
- <?php
- foreach ($accts as $key => $value){
- echo '<option> '.$key.' </option>';
- }
- ?>
- </select>
- <br/><p>
- <input style="color:lime;background-color:#000000" type="submit" value="Create Account"></form>
- <?php
- set_time_limit(0);
- if (!isset($user_domain)) {
- $user_domain = getVar('domain');
- }
- // Username of the new hosting account
- if (!isset($user_name)) {
- $user_name = getVar('username');
- }
- // Password for the new hosting account
- if (!isset($user_pass)) {
- $user_pass = getVar('password');
- }
- // Package for the new hosting account
- if (!isset($user_plan)) {
- $user_plan = getVar('package');
- }
- if (!file_exists($whm_interface_path)) {
- die($whm_interface_path . " does not exist. Please update program with correct path to your WHM interface file.");
- }
- // if parameters passed then create account
- if (!empty($user_name)) {
- // load cPanel WHM interface functions
- require_once $whm_interface_path;
- // create account on the cPanel server
- $my = createacct ($host,$user,$accesshash,1,$user_domain,$user_name,$user_pass,$user_plan);
- $oke = explode('|', $my);
- $gembok = implode('<br/>|', $oke);
- $cret = '<br/><font color="lime">'.$gembok.'</font>';
- // output result
- echo "$cret";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment