Zubrag.com
October 16, 2018, 05:17:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Addon creator script problems and how to delete these  (Read 3748 times)
hws
Newbie
*
Posts: 1


« on: March 28, 2009, 07:31:10 PM »

Hi,

My code is as follows:

Code:
$username = $_POST['username'];
$password = $_POST['password'];
$domain = $_POST['domain'];
$domprefix = $_POST['domprefix'];
// Creating cPanel main account Variables
// cPanel username
$cpanel_user = "******";
// cPanel password
$cpanel_password = "******";
// cPanel host
$cpanel_host = "******";
// cPanel theme/skin, usually "x"
$cpanel_skin = "x";
// Path to cURL on your server
$curl_path = "/usr/bin/curl";

// Set Up The Customer's Web Hosting Account
$database = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adddb.html?db=$username'");
$adduser = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adduser.html?user=$username&pass=$password'");
$asignuser = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/addusertodb.html?user=$cpanel_user_$username&db=$cpanel_user_$username&ALL=ALL'");
$dom = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/addon/doadddomain.html?domain=$domain.$domprefix&user=$domain&pass=$password'");
$ftp = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/ftp/doaddftp.html?login=$username&password=$password&homedir=$subdomain&quota=500'");
$popmail = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/mail/doaddpop.html?email=$username&domain=$subdomain.your primary domain&password=$password&quota=20'");

However, i'm am currently using this script and it works fine but for some small things.

Firstly, after this script is run i check my cpanel and seen that the username typed in from the script has added to my domain (main hosting account) email address and not the domain (addon domain) email address that was added from the script. Is this normal?

Secondly, it the same for the database.

Finally, how do i use a delete from these if i want to cancel the account inserted.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC