• 11-06-2017, 00:55:26
    #1
    Merhaba arkadaşlar,

    Whmye veya cpanele girmeden hosting, subdomain ve mail hesapları açmak için onerebileceginiz ücretsiz script veyahut api kodları var mi ?

    SM-G610F cihazımdan Tapatalk kullanılarak gönderildi
  • 11-06-2017, 02:10:42
    #3
    Bunu lisanssız kullanım için düşünüyorsanız, bildiğim kadarıyla lisans olmayınca api de çalışmıyor.
  • 11-06-2017, 11:20:24
    #4
    @bilisimworld hayır hocam. Mevcut whm panellerimin lisanslari var ancak tek tek whm panellere girmektense tek panel üzerinden islemlerimi halletmek icin sistem tasarliyorum

    SM-G610F cihazımdan Tapatalk kullanılarak gönderildi
  • 11-06-2017, 11:33:03
    #5
    PhpCode adlı üyeden alıntı: mesajı görüntüle
    @bilisimworld hayır hocam. Mevcut whm panellerimin lisanslari var ancak tek tek whm panellere girmektense tek panel üzerinden islemlerimi halletmek icin sistem tasarliyorum

    SM-G610F cihazımdan Tapatalk kullanılarak gönderildi
    şöyle bir kod kullanmıştım çalışıyor:
    <?php
    define('CPANELUSER','kadi');
    define('CPANELPASS','şifre');
    define('INPUT_FILE','domains.txt');
    define('CPANEL_SKIN','tema');
    define('DOMAIN','site link');
    function getVar($name, $def = '') {
      if (isset($_REQUEST[$name]) && ($_REQUEST[$name] != ''))
        return $_REQUEST[$name];
      else 
        return $def;
    }
    $cpaneluser=CPANELUSER;
    $cpanelpass=CPANELPASS;
    $cpanel_skin=CPANEL_SKIN;
    if (isset($_REQUEST["subdomain"])) {
      $doms = array(DOMAIN. ";" . $_REQUEST["subdomain"]);
    }
    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>
      <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();
      }
    
      $authstr = "$ownername:$passw";
      $pass = base64_encode($authstr);
      $in = "GET $request\r\n";
      $in .= "HTTP/1.0\r\n";
      $in .= "Host:$host\r\n";
      $in .= "Authorization: Basic $pass\r\n";
      $in .= "\r\n";
     
      fputs($sock, $in);
      while (!feof($sock)) {
        $result .= fgets ($sock,128);
      }
      fclose( $sock );
    
      return $result;
    }
    
    foreach($doms as $dom) {
      $lines = explode(';',$dom);
      if (count($lines) == 2) {
        // domain and subdomain passed
        $domain = trim($lines[0]);
        $subd = trim($lines[1]);
      }
      else {
        $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);
    }
    
    ?>
    buda eposta için:http://www.zubrag.com/scripts/cpanel...il-account.php
  • 11-06-2017, 11:47:26
    #6
    theykk adlı üyeden alıntı: mesajı görüntüle
    şöyle bir kod kullanmıştım çalışıyor:
    <?php
    define('CPANELUSER','kadi');
    define('CPANELPASS','şifre');
    define('INPUT_FILE','domains.txt');
    define('CPANEL_SKIN','tema');
    define('DOMAIN','site link');
    function getVar($name, $def = '') {
      if (isset($_REQUEST[$name]) && ($_REQUEST[$name] != ''))
        return $_REQUEST[$name];
      else 
        return $def;
    }
    $cpaneluser=CPANELUSER;
    $cpanelpass=CPANELPASS;
    $cpanel_skin=CPANEL_SKIN;
    if (isset($_REQUEST["subdomain"])) {
      $doms = array(DOMAIN. ";" . $_REQUEST["subdomain"]);
    }
    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>
      <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();
      }
    
      $authstr = "$ownername:$passw";
      $pass = base64_encode($authstr);
      $in = "GET $request\r\n";
      $in .= "HTTP/1.0\r\n";
      $in .= "Host:$host\r\n";
      $in .= "Authorization: Basic $pass\r\n";
      $in .= "\r\n";
     
      fputs($sock, $in);
      while (!feof($sock)) {
        $result .= fgets ($sock,128);
      }
      fclose( $sock );
    
      return $result;
    }
    
    foreach($doms as $dom) {
      $lines = explode(';',$dom);
      if (count($lines) == 2) {
        // domain and subdomain passed
        $domain = trim($lines[0]);
        $subd = trim($lines[1]);
      }
      else {
        $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);
    }
    
    ?>
    buda eposta için:http://www.zubrag.com/scripts/cpanel...il-account.php


    hocam kodları incelediğimde subdomain oluşturmak için kullanıyorsunuz sanırım siz bunu ?
  • 11-06-2017, 11:50:35
    #7
    PhpCode adlı üyeden alıntı: mesajı görüntüle
    hocam kodları incelediğimde subdomain oluşturmak için kullanıyorsunuz sanırım siz bunu ?
    evet aynı mantıkla herşeyi yaptırabilirsiniz