• 14-01-2010, 19:01:04
    #1
    önce aşağıdaki satırları notepadde yazıp farklı kaydetten "cpanelLogin.php" olarak kaydediyoruz.
    <?php
    // make sure all needed information is provided
    if($_POST['domain'] && $_POST['username'] && $_POST['pass'] && !($_GET['failed'] == "1")) {
        $port = $_POST['port']; // sets the port number to login to
        // Get the protocol to use for this connection
        switch($port) {
          case '2082': // cPanel
          case '2086': // WHM
          case '2095': // Webmail
            $protocol = 'http://';
            break;
          case '2083': // Secure cPanel
          case '2087': // Secure WHM
          case '2096': // Secure Webmail
            $protocol = 'https://';
            break;
        }
      // Build the URL
      $redirectlocation = $protocol.$_POST['domain'].':'.$port.'/login/?user='.$_POST['username'].'&pass='.$_POST['pass'].'&failurl='.$_POST['failurl'];
      header ("Location: ".$redirectlocation); // Send URL
    } else {
      $error = 1;
      header ("Location: ".$_POST['failurl']); // Send URL if all neede information is not provided
    }
    ?>
    sonra paneli koyacağımız yere aşağıdaki kodu, değiştirmeden(eğer anlıorsanız, tabiki de isteğinize göre değiştirebilirsiniz) eklioruz.

    <form action="cpanelLogin.php" method="POST">
    <?php
    // Show an error if the login failed
    if(($_GET['failed'] == "1") or ($error == 1)){
    echo '<font color="#FF0000">Your login attempt failed!</font><br />';
    }
    ?>
    Domain: <input type="text" name="domain" value="" size="20" /><br />
    Username: <input type="text" name="username" value="" size="20" /><br />
    Password: <input type="password" name="pass" value="" size="20" /><br />
    <?php
    // This failurl allows cPanel to redirect back to this site
    echo '<input type="hidden" name="failurl" value="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?failed=1">';
    ?>
    Options: <select name="port">
      <option value="2082">cPanel </option>
      <option value="2083">Secure cPanel </option>
      <option value="2086">WHM</option>
      <option value="2087">Secure WHM</option>
      <option value="2095">Webmail</option>
      <option value="2096">Secure Webmail</option>
    </select><br />
    <input type="submit" value="Login" />
    </form>
    eğer sadece cPanel'e girmesini istiyorsanız, ikinci kodda
    <select name="port">
      <option value="2082">cPanel </option>
      <option value="2083">Secure cPanel </option>
      <option value="2086">WHM</option>
      <option value="2087">Secure WHM</option>
      <option value="2095">Webmail</option>
      <option value="2096">Secure Webmail</option>
    </select>
    kodu yerine sadece
    <input type=”hidden” name=”port” value=”2082″>
    kodunu ekliyoruz.
  • 15-01-2010, 10:31:51
    #2
    Çok beğendim hocam elinize sağlık
  • 15-01-2010, 15:25:22
    #3
    afiyet olsun
  • 15-01-2010, 17:58:45
    #4
    Elinize Saglık Güzel Paylaşiim..
  • 15-01-2010, 19:59:30
    #5
    Herhangi bir scripte + giriş olarak kullanabilir miyiz bunu ?
  • 15-01-2010, 20:35:09
    #6
    nasıl yani tam anlamadım sorunuzu. eğer cPanel yerine başka bir yere login ettirebilir miyiz diye soruyorsan, ordaki kodları uygun düzen içinde değiştirirsen tabi ki.
  • 15-01-2010, 20:35:56
    #7
    antishareware adlı üyeden alıntı: mesajı görüntüle
    Herhangi bir scripte + giriş olarak kullanabilir miyiz bunu ?
    nasıl yani tam anlamadım sorunuzu. eğer cPanel yerine başka bir yere login ettirebilir miyiz diye soruyorsan, ordaki kodları uygun düzen içinde değiştirirsen tabi ki.
  • 15-01-2010, 23:19:33
    #8
    onusweb adlı üyeden alıntı: mesajı görüntüle
    nasıl yani tam anlamadım sorunuzu. eğer cPanel yerine başka bir yere login ettirebilir miyiz diye soruyorsan, ordaki kodları uygun düzen içinde değiştirirsen tabi ki.
    Aynen öyle mesela wp kullanıyorum site.com/wp-admin dedikten sonra ilk önce bu çıksın, sonra normal wp sayfası çıksın.
  • 16-01-2010, 13:32:32
    #9
    Platin üye
    Çok işime yaradı çok saolasın

    Plesk içinde olanı varmı ?