Advertisement
Guest User

Script cPanel creator ( Haris DP )

a guest
Feb 22nd, 2016
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. <title>cPanel Creator by Haris DP</title>
  2. <font color="blue">
  3. <fieldset>
  4. <legend>~ cPanel Creator V1.1 ~</legend>
  5. <?php
  6.  
  7. $whm_user = "user"; // username whm atau root anda
  8. $whm_pass = "pass"; // password whm atau root anda
  9. $whm_host = "ipserver"; // ip server anda
  10. $script = "https://{$whm_user}:{$whm_pass}@{$whm_host}:2087/xml-api/listpkgs";
  11. $onc = file_get_contents($script);
  12. $xml = new DOMDocument();
  13. $xml->loadXML($onc);
  14. $list = $xml->getElementsByTagName('name');
  15. $i=0;
  16. foreach ($list AS $element)
  17. {
  18. foreach ($element->childNodes AS $item)
  19. {
  20. $result[$i]['package_name']=$item->nodeValue;
  21. $i++;
  22. }
  23. }
  24. ?>
  25.  
  26. <form method="post">
  27. <hr>
  28. <strong>Peringatan!</strong> Don't Sell this script!
  29. <hr>
  30. <pre>
  31. <center>*** Tutor by Haris Dwi Pambudi ***</center>
  32. <center><table border="0">
  33. <tr><td>Domain:</td><td><input name="domain" value=""></td></tr>
  34. <tr><td>Username:</td><td><input name="usercp" value="">
  35. </td></tr>
  36. <tr><td>Package:</td><td><select
  37. name="pkg">
  38.  
  39. <option VALUE="Kecil">Kecil / 1 Bulan</option>
  40. <option VALUE="Sedang">Sedang / 1 Bulan</option>
  41. <option VALUE="Besar">Besar / 1 Bulan</option></select>
  42. </td></tr>
  43. <tr><td>Email:</td><td><input name="mail" value=""></td></tr><tr>
  44. </table>
  45. <input class="button" type="submit" name="gg" value="Create Account"></div></center>
  46.  
  47. <fieldset>
  48. <legend>Result !!</legend>
  49. <?php
  50. if($_POST['gg']){
  51. $d = $_POST['domain'];
  52. $uscp = $_POST['usercp'];
  53. $pkg = $_POST['pkg'];
  54. $pas = $_POST["pass"];
  55. $userid = $hasil['username'];
  56. $vangke = substr($userid, 3);
  57. $email = $_POST["mail"];
  58. // Kalau mau dibuat tools, code dibawah bisa digunakan dan sqlnya buat sendiri
  59. if ($pkg == Kecil) {
  60. $tiket = 3000;
  61. $durasi = '30';
  62. $newdate = strtotime ( '+30 day' , strtotime ( $date ) ) ;
  63. $newdate = date ( 'Y-m-d' , $newdate );
  64. }else if ($pkg == Sedang) {
  65. $tiket = 6000;
  66. $durasi = '30';
  67. $newdate = strtotime ( '+30 day' , strtotime ( $date ) ) ;
  68. $newdate = date ( 'Y-m-d' , $newdate );
  69. }else if ($pkg == Besar) {
  70. $tiket = 10000;
  71. $durasi = '30';
  72. $newdate = strtotime ( '+30 day' , strtotime ( $date ) ) ;
  73. $newdate = date ( 'Y-m-d' , $newdate );
  74. } else {
  75. $tiket = a;
  76. }
  77. $hapy = "https://{$whm_user}:{$whm_pass}@{$whm_host}:2087/scripts/wwwacct?plan={$pkg}&domain={$d}&username={$uscp}&password={$pas}&contactemail={$email}";
  78. $seru = file_get_contents($hapy);
  79. $oke = explode("Dns Zone check is enabled.",$seru);
  80. $okt = explode("...Done",$oke[1]);
  81. $okc = explode('|', $okt[0]);
  82. $ak = implode('<br/>|', $okc);
  83. }
  84. echo "$ak";
  85. if($ak){
  86. $gat = "https://{$whm_user}:{$whm_pass}@{$whm_host}:2087/scripts/wwwacct?plan={$pkg}&domain={$d}&username={$uscp}&password={$pas}&contactemail={$email}";
  87. $fail = file_get_contents($gat);
  88. $fmb = explode('failed', $fail);
  89. echo "<br/>$fmb[1]";
  90. }
  91. ?>
  92. </fieldset>
  93. </form>
  94. </div>
  95.  
  96. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement