малко помощ за whm/cpanel скрипт

KyMyHuCT

Registered
здравейте искам да ви попитам от този код

Код:
<?php

###############################################################
# cPanel WHM Account Creator 1.1
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
# 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: create-whm-account.php?domain=reseller.com&user=hosting&password=manager&package=unix_500
#
# 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   = "root";      // reseller username
$whm_pass   = "password";  // 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
// Example: newuser.zubrag.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/WHM 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/WHM Account Creator</h3>
<table border="0">
<tr><td>Domain:</td><td><input name="domain" size="30"></td><td>Subdomain or domain, without www</td></tr>
<tr><td>Username:</td><td><input name="user" size="30"></td><td>Username to be created</td></tr>
<tr><td>Password:</td><td><input name="password" size="30"></td><td></td></tr>
<tr><td>Package:</td><td><input name="package" size="30"></td><td>Package (hosting plan) name. Make sure you cpecify existing package</td></tr>
<tr><td>Contact Email:</td><td><input name="email" size="30"></td><td></td></tr>
<tr><td colspan="3"><br /><input type="submit" value="Create Account"></td></tr>
</table>
</form>
</body>
</html>
EOD;
echo $frm;
}

?>


някой ще можели да ми го направи да работи с смс за мобио и да праща имейл на потребитела нещо подобно както е на смсхостинг ако знаете
много ще съм ви благодарен на всички помогнали благодаря предварително
 
този код мисля че е по добър ама така като не разбирам много ви го давам да го прегледате

Код:
<form action="setup.php" method='post'> 
<table border="0" align="center" cellpadding="3" cellspacing="0"> 
  <tr> 
    <td><div align="right"> 
      <input name="domain" type="text" id="domain"> 
    </div></td> 
  </tr> 
  <tr> 
    <td><div align="right"> 
      <input name="pass" type="text" id="pass"> 
    </div></td> 
  </tr> 
  <tr> 
    <td><div align="right"> 
      <input name="user" type="text" id="user"> 
    </div></td> 
  </tr> 
  <tr> 
    <td><div align="right"> 
      <input type="submit" name="Submit" value="Submit"> 
    </div></td> 
  </tr> 
</table></form> 

<?php 

require '/usr/local/cpanel/Cpanel/Accounting.php.inc'; 
$host = "localhost"; 
$user = "root"; 
$accesshash = 'The remote access key goes here, I think'; 
$usessl = "0"; 
$acctdomain = ""; 
$acctplan = "Business Package"; 

createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan); 

?>
 
Мисля, че е за раздел "Обяви за работа". До колкото разбирам се опитваш да печелиш от SMS-и, редно е ако не можеш сам да заплатиш за услугата.
Иначе:
1. Ако си зибрал метод за плащане "проверка на код" (мобио). Отиваш на
тяхната страница и си взимаш кода на функцията
Код:
mobio_checkcode()
Добавяш я във файла.
След това във формата за регистрация си добавяш едно поле за въвеждане на код
Код:
<tr><td>Въведете кода от Мобио:</td><td><input name="mobio" size="30"></td><td></td></tr>
Някъде около ред 94
Код:
if (!empty($user_name)) {
заменяш с
Код:
if (!empty($user_name) && mobio_checkcode($_REQUEST['mobio'])) {


Добре е също така малко по-нагоре да провериш дали е въведен mobio код и дали е валиден, също така да си водиш статистика всеки код колко пъти е използван (това може да се ограничи и от контролният панел на мобио) за да не те цакат няколко човека с един и същи код.

Този скрипт не ти дава възможност да подновиш/продължиш даден хостинг а работи само за регистрация.

Поздрави.
 
немога да го направя опитах но незнам какъв код по точно да добавя от мобио смисъл chek code дето си ми написал,това за кода го знам направил съм го по 1 път да работи
 

Back
Горе