Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ###################################################################################################
- # cPanel Account Creator 1.1
- ###################################################################################################
- # Visit http://jamvanhax0r.heck.in/ and http://wap-jamvan.us.to/ Kalo Mau Tau Update'an Selanjut'y
- ###################################################################################################
- # Required parameters:
- # - domain - new account domain
- # - user - new account username
- # - password - new account password
- # - package - new account hosting package (plan)
- # - email - contact email
- #
- # Sample run: namafileente.php?domain=domainwhm.com&user=usernamewhm&password=passwhm&package=packagewhm_ente
- #
- # If no parameters passed then input form will be shown to enter data.
- #
- # This 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
- #
- ###############################################################
- /////// YOUR WHM LOGIN DATA
- $whm_user = "ISI DENGAN USER WHM"; // reseller username
- $whm_pass = "ISI DENGAN PASS WHM"; // the password you use to login to WHM
- #####################################################################################
- ############## END OF SETTINGS. DO NOT EDIT BELOW #######################
- #####################################################################################
- $whm_host = $_SERVER['HTTP_HOST'];
- function getVar($name, $def = '') {
- if (isset($_REQUEST[$name]))
- return $_REQUEST[$name];
- else
- return $def;
- }
- // Domain name of new hosting account
- // To create subdomain just pass full subdomain name
- // Contoh: jamvan.hax0r.com
- if (!isset($user_domain)) {
- $user_domain = getVar('domain');
- }
- // Username of the new hosting account
- if (!isset($user_name)) {
- $user_name = getVar('user');
- }
- // Password for the new hosting account
- if (!isset($user_pass)) {
- $user_pass = getVar('password');
- }
- // New hosting account Package
- if (!isset($user_plan)) {
- $user_plan = getVar('package');
- }
- // Contact email
- if (!isset($user_email)) {
- $user_email = getVar('email');
- }
- // if parameters passed then create account
- if (!empty($user_name)) {
- // create account on the cPanel server
- $script = "http://{$whm_user}:{$whm_pass}@{$whm_host}:2086/scripts/wwwacct";
- $params = "?plan={$user_plan}&domain={$user_domain}&username={$user_name}&password={$user_pass}&contactemail={$user_email}";
- $result = file_get_contents($script.$params);
- // output result
- echo "RESULT: " . $result;
- }
- // otherwise show input form
- else {
- $frm = <<<EOD
- <html>
- <head>
- <title>cPanel Account Creator</title>
- <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
- <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
- </head>
- <body>
- <style>
- input { border: 1px solid black; }
- </style>
- <form method="post">
- <h3>cPanel Account Creator</h3>
- <table border="0">
- <tr><td>Domain:</td><td><input name="domain" size="30"></td><td>Masukan Domain Tanpa http:// and [ www ]</td></tr>
- <tr><td>Username:</td><td><input name="user" size="30"></td><td>Username cPanel Ente</td></tr>
- <tr><td>Password:</td><td><input name="password" size="30"></td><td>Bebas [ Pakai Angka, Symbol, etc... ]</td></tr>
- <tr><td></td><td><input type="hidden" name="package" size="30"value="ISI DENGAN PACKAGE WHM ENTE"></td><td></td></tr>
- <tr><td>Contact Email:</td><td><input name="email" size="30"value="emailente@yahoo.com"></td><td>Jangan Lupa, Email :v</td></tr>
- <tr><td colspan="3"><br /><input type="submit" value="Hajar Cok !"></td></tr>
- </table>
- </form>
- </body>
- </html>
- EOD;
- echo $frm;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement