Results 1 to 6 of 6

Thread: FTP Account Creator [php]

  1. #1
    // Cpanel username and password
    $user = "your-cpanel-username-here";
    $pass = "your-cpanel-password-here";
    // cpanel skin. For more info on what is your skin check 
    $skin = "x";
    function getVar($name, $def = '') {
      if (isset($_REQUEST[$name]))
        return $_REQUEST[$name];
        return $def;
    // ftp account for domain
    if (!isset($domain)) {
      $domain = getVar('domain');
    // ftp user
    if (!isset($fuser)) {
      $fuser = getVar('fuser');
    // ftp password
    if (!isset($fpass)) {
      $fpass = getVar('fpass');
    // ftp quota
    if (!isset($fquota)) {
      $fquota = getVar('fquota');
    // ftp homedir
    if (!isset($fhomedir)) {
      $fhomedir = getVar('fhomedir');
    if (empty($domain)) {
    $frm = <<<EOD
      <title>cPanel FTP Account Creator</title>
        input { border: 1px solid black; }
    <form method="post">
    <h3>cPanel FTP Account Creator</h3>
    <table border="0">
    <tr><td>Domain:</td><td><input name="domain" size="30"></td><td>domain without www part</td></tr>
    <tr><td>FTP Username:</td><td><input name="fuser" size="30"></td><td></td></tr>
    <tr><td>FTP Password:</td><td><input name="fpass" size="30"></td><td></td></tr>
    <tr><td>FTP Home Directory:</td><td><input name="fhomedir" size="30" value="/"></td><td></td></tr>
    <tr><td>FTP Quota:</td><td><input name="fquota" size="30" value="0"></td><td>numeric ftp quota, Mb (0 for unlimited)
    This parameter may not work with early cPanel versions.</td></tr>
    <tr><td colspan="3">
    <input type="submit" value="Create FTP Account"></td></tr>
    $url = "http://$user:$pass@$domain:2082/frontend/$skin/ftp/doaddftp.html?";
    $url = $url . "login=$fuser&password=$fpass&homedir=$fhomedir&quota=$fquota";
    $result = @file_get_contents($url);
    if ($result === FALSE) die("ERROR: FTP Account not created. Please make sure you passed correct parameters.");
    echo $result;
    Last edited by Shenron; 1 June, 2009 at 08:53 AM.

  2. #2
    Cool share

  3. #3
    Join Date
    Feb 2009
    Webhost Hell!
    Why can&#39;t you just create it through cpanel without the hassle :P

  4. #4
    its used to devlopers
    if you want to creat your won script

  5. #5
    Join Date
    Jan 2009
    In Your Heart......
    Using WHM XML API Would be better!

    I use that only!

  6. Quote Originally Posted by thatsfine View Post
    Using WHM XML API Would be better!
    I use that only!
    Except then you're dependent upon WHM...
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

Similar Threads

  1. [WTH] Account Creator - Need Pixelpipe Account
    By KonCorps in forum Services
    Replies: 0
    Last Post: 10 July, 2010, 02:18 AM
  2. [WTB] selling 1 year hotfile account-100% genuine account
    By lavangiriece in forum Marketplace
    Replies: 2
    Last Post: 21 November, 2009, 06:05 AM
  3. If you were a creator...
    By thebookmarker in forum General Chat
    Replies: 17
    Last Post: 6 September, 2009, 16:34 PM
  4. Email Account Creator [php]
    By ghadeer in forum Programming
    Replies: 0
    Last Post: 4 May, 2009, 10:03 AM
  5. cPanel WHM Account Creator
    By ghadeer in forum Programming
    Replies: 0
    Last Post: 4 May, 2009, 09:50 AM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts