Jump to content

PLEASE HELP


bob2006

Recommended Posts

Hello I have a scrpits that set up email account with cpanel but the virbale are not carring over here are the scripts

<?php


echo("<table align='center'>
<form action=' cpemail.php' method='POST'>
<tr><td>UserName:</td><td><input type='text' name='user'></td></tr>
<tr><td>Password:</td><td><input type='password' name='pass'></td></tr>
<tr><td><input type='submit' name='submit' value='Submit'></td></tr>
</form>
</table>");
?>

and
<?php

###############################################################
# cPanel Email Account Creator 1.0
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
# You can pass following parameters in calling URL. They will
# override those specified below.
# user - new email user
# pass - password
# domain - email domain
# quota - email quota, Mb
# Example: cpemail.php?user=newuser&pass=password&quota=50
###############################################################

// cPanel info
$cpuser = '****'; // cPanel username
$cppass = '****'; // cPanel password
$cpdomain = 'bob.tdsnet.org'; // cPanel domain or IP
$cpskin = 'x2';  // cPanel skin. Mostly x or x2.
// See following URL to know how to determine your cPanel skin
// http://www.zubrag.com/articles/determine-cpanel-skin.php

// Default email info for new email accounts
// These will only be used if not passed via URL
$euser = 'user'; // email username (without @ and domain)
$epass = 'pass'; // email password
$edomain = 'bob.tdsnet.org'; // email domain (usually same as cPanel domain above)
$equota = 20; // amount of space in megabytes

###############################################################
# END OF SETTINGS
###############################################################

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

// check if overrides passed
$euser = getVar('user', $euser);
$epass = getVar('pass', $epass);
$edomain = getVar('domain', $edomain);
$equota = getVar('quota', $equota);

// Create email account
$f = fopen ("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&quota=$equota", "r");
if (!$f) {
  die('Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode');
}

// Check result
while (!feof ($f)) {
  $line = fgets ($f, 1024);
  if (ereg ("already exists!", $line, $out)) {
    die('Such email account already exists.');
  }
}
fclose($f);

echo "Email account created.";

?>
please help
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.