Advertisement
Guest User

Untitled

a guest
Mar 26th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. <?php
  2.  
  3. ###############################################################
  4. # cPanel WHM Creator 1.1
  5. ###############################################################
  6. # Visit http://x-newsinfo.blogspot.co.id/
  7. # Tutorial pemakaian buka aja http://x-newsinfo.blogspot.co.id/
  8. ###############################################################
  9. /////// YOUR WHM LOGIN DATA
  10. $whm_user = ""; // Username WHM nya
  11. $whm_pass = ""; // Password WHM, disarankan cuma memakai huruf dan angka untuk menghindari Error
  12.  
  13. #####################################################################################
  14. ############## Jangan di edit macam macam, nanti error #########################
  15. #####################################################################################
  16.  
  17. $whm_host = ""; // IP WHM nya
  18.  
  19. function getVar($name, $def = '') {
  20. if (isset($_REQUEST[$name]))
  21. return $_REQUEST[$name];
  22. else
  23. return $def;
  24. }
  25.  
  26. // Domain name of new hosting account
  27. // To create subdomain just pass full subdomain name
  28. // Example: newuser.zubrag.com
  29. if (!isset($user_domain)) {
  30. $user_domain = getVar('domain');
  31. }
  32.  
  33. // Username of the new hosting account
  34. if (!isset($user_name)) {
  35. $user_name = getVar('user');
  36. }
  37.  
  38. // Password for the new hosting account
  39. if (!isset($user_pass)) {
  40. $user_pass = getVar('password');
  41. }
  42.  
  43. // New hosting account Package
  44. if (!isset($user_plan)) {
  45. $user_plan = getVar('package');
  46. }
  47.  
  48. // Contact email
  49. if (!isset($user_email)) {
  50. $user_email = getVar('email');
  51. }
  52.  
  53. // if parameters passed then create account
  54. if (!empty($user_name)) {
  55.  
  56. // create account on the cPanel server
  57. $script = "http://{$whm_user}:{$whm_pass}@{$whm_host}:2086/scripts/wwwacct";
  58. $params = "?plan={$user_plan}&domain={$user_domain}&username={$user_name}&password={$user_pass}&contactemail={$user_email}";
  59. $result = file_get_contents($script.$params);
  60.  
  61. // output result
  62. echo "RESULT: " . $result;
  63. }
  64. // otherwise show input form
  65. else {
  66. $frm = <<<EOD
  67. <html>
  68. <head>
  69. <title>cPanel Creator</title>
  70. <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  71. <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
  72. </head>
  73. <body>
  74. <style>
  75. input { border: 1px solid black; }
  76. </style>
  77. <form method="post">
  78. <h3>cPanel Creator</h3>
  79. <table border="0">
  80. <tr><td>Domain:</td><td><input name="domain" size="30"></td><td></td></tr>
  81. <tr><td>Username:</td><td><input name="user" size="30"></td><td></td></tr>
  82. <tr><td>Password:</td><td><input name="password" size="30"></td><td></td></tr>
  83. <tr><td></td><td>
  84. <input type="hidden" name="package" size="30" value="">
  85. </td><td></td></tr>
  86. <tr><td>Contact Email:</td><td><input name="email" size="30"></td><td></td></tr>
  87. <tr><td colspan="3"><br /><input type="submit" value="Create Account"></td></tr>
  88. </table>
  89. </form>
  90. </body>
  91. </html>
  92. EOD;
  93. echo $frm;
  94. }
  95.  
  96. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement