switch006
07-14-2004, 06:08 AM
I have this
<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$key = "mykeyhere";
$silver = "lukemce1_vmailsilver";
$gold = "lukemce1_vmailgold";
$user = "lukemce1";
function createbronze($acctDomain, $acctUser, $acctPass)
{
global $key;
$result = createacct("localhost", "lukemce1", $key, 0, $acctDomain, $acctUser, $acctPass, "lukemce1_vmailbronze");
if (!empty($result) ) {
echo "Created";
}
else echo "Not created";
}
createbronze("testdomain", "someusername", "somepass");
print_r(listaccts("localhost", "lukemce1", $key, 0));
?>
It echo's Creatd, but the account is not created when it prints them, or when i view in WHM. :(
Am i using the correct parameters etc, ie user IS the name i log into via mydomain.com/whm ?
Thanks :)
<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$key = "mykeyhere";
$silver = "lukemce1_vmailsilver";
$gold = "lukemce1_vmailgold";
$user = "lukemce1";
function createbronze($acctDomain, $acctUser, $acctPass)
{
global $key;
$result = createacct("localhost", "lukemce1", $key, 0, $acctDomain, $acctUser, $acctPass, "lukemce1_vmailbronze");
if (!empty($result) ) {
echo "Created";
}
else echo "Not created";
}
createbronze("testdomain", "someusername", "somepass");
print_r(listaccts("localhost", "lukemce1", $key, 0));
?>
It echo's Creatd, but the account is not created when it prints them, or when i view in WHM. :(
Am i using the correct parameters etc, ie user IS the name i log into via mydomain.com/whm ?
Thanks :)
