bob2006 Posted September 1, 2006 Share Posted September 1, 2006 Hello I have a scrpits that set up email account with cpanel but the virbale are not carring over here are the scripts <?phpecho("<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"a=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"a=$equota", "r");if (!$f) { die('Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode');}// Check resultwhile (!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 Quote Link to comment https://forums.phpfreaks.com/topic/19337-please-help/ Share on other sites More sharing options...
samshel Posted September 1, 2006 Share Posted September 1, 2006 Hello,The script needs checks for variables in GET and the form you submit has a POST method. Change the method of the form to 'GET'.hth Quote Link to comment https://forums.phpfreaks.com/topic/19337-please-help/#findComment-83892 Share on other sites More sharing options...
bob2006 Posted September 1, 2006 Author Share Posted September 1, 2006 thank you Quote Link to comment https://forums.phpfreaks.com/topic/19337-please-help/#findComment-83896 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.