Kendim halletim arkadaşlar.
PHP ile Subdomain açma olayını o kadar büyütüp 600-1000 liradan bahseden arkadaşlar.
Buyrun belki lazım olur
yapamayan olursa yardımcı olurum.
teşekkürler.
<?php




define('CPANELUSER','user');


define('CPANELPASS','pass');


define('INPUT_FILE','domains.txt');


define('CPANEL_SKIN','x');


define('DOMAIN','');




function getVar($name, $def = '') {
  if (isset($_REQUEST[$name]) && ($_REQUEST[$name] != ''))
    return $_REQUEST[$name];
  else 
    return $def;
}

$cpaneluser=getVar('cpaneluser', CPANELUSER);
$cpanelpass=getVar('cpanelpass', CPANELPASS);
$cpanel_skin = getVar('cpanelskin', CPANEL_SKIN);

if (isset($_REQUEST["subdomain"])) {
 
  $doms = array( getVar('domain', DOMAIN) . ";" . $_REQUEST["subdomain"]);
  if (getVar('domain', DOMAIN) == '') die("You must specify domain name");
}
else {

  $doms = @file(INPUT_FILE);
  if (!$doms) {

    echo "
Cannot find input file with subdomains information. It is ok if you are not creating subdomains from file.<br>
Tip: leave field empty to use default value you have specified in the script's code.<br>
<form method='post'>
  Subdomain:<input name='subdomain'><br>
  Domain:<input name='domain'><br>
  cPanel User:<input name='cpaneluser'><br>
  cPanel Password:<input name='cpanelpass'><br>
  cPanel Skin:<input name='cpanelskin'><br>
  <input type='submit' value='Create Subdomain' style='border:1px solid black'>
</form>";
    die();
  }
}


function subd($host,$port,$ownername,$passw,$request) {

  $sock = fsockopen('localhost',2082);
  if(!$sock) {
    print('Socket error');
    exit();
  }

  fclose( $sock );

  return $result;
}

foreach($doms as $dom) {
  $lines = explode(';',$dom);
  if (count($lines) == 2) {
 
    $domain = trim($lines[0]);
    $subd = trim($lines[1]);
  }
  else {

    $domain = getVar('domain', DOMAIN);
    $subd = trim($lines[0]);
  }

  $request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd";
  $result = subd('localhost',2082,$cpaneluser,$cpanelpass,$request);
  $show = strip_tags($result);
  echo $show;
}

?>