Ik heb al een tijdje een reseller bij een hosting gehaald alleen de directadmin api wilt niet mee werken heb ik hier ergens een fout..? Ik krijg wel een mail van dat de gebruiker is aangemaakt maar als ik via directadmin kijk staat user op 0 en niet op 1 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
include (./httpsocket.php);
ini_set(display_errors, true);
error_reporting(E_ALL);
$email = "email";
$username = "klant".rand(000,999)."";
$pass = rand(000000, 999999);
$package = "host1";
$server_ssl = "N";
$server_host = ip van reseller;
$server_port = 2222;
if (isset($_POST[action]) && $_POST[action] == "add")
{
$sock = new HTTPSocket;
if ($server_ssl == Y)
{
$sock->connect("ssl://".$server_host, $server_port);
}
else
{
$sock->connect($server_host, $server_port);
}
$sock->set_login("gebruikersnaam",wachtwoord);
$sock->query(/CMD_API_ACCOUNT_USER,
array(
username => $username, // The Users username. 4-8 characters, alphanumeric
email => $email, // A valid email address
passwd => $pass, // The Users password. 5+ characters, ascii
passwd2 => $pass, // Password double check. 5+ characters, ascii
domain => domain.com, // A valid domain name in the form: domain.com
package => $package, // One of the User packages created by the Reseller
ip => ip van reseller;
notify => yes,
action => create,
add => Submit
));
}
echo "User $username created
";
$Tekst =
Beste gebruiker,
Uw hosting pakket is aangemaak.
;
$Tekst .= Account details
Hosting pakket: Webhosting #1
Login Details
Gebruikersnaam: .$username.
Wachtwoord: .$pass.
Controle panel: http://87.236.102.68:.$server_port.;
mail($email,Test| Bestelling: Webhosting pakket is klaar voor gebruik!, $Tekst, "From: No-reply@domain.com
Content-Type: text/html; charset=iso-8859-1");
?>
Spoiler tonen
Codeblok (voorbeeld.php):
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
include (./httpsocket.php);
ini_set(display_errors, true);
error_reporting(E_ALL);
$email = "email";
$username = "klant".rand(000,999)."";
$pass = rand(000000, 999999);
$package = "host1";
$server_ssl = "N";
$server_host = ip van reseller;
$server_port = 2222;
if (isset($_POST[action]) && $_POST[action] == "add")
{
$sock = new HTTPSocket;
if ($server_ssl == Y)
{
$sock->connect("ssl://".$server_host, $server_port);
}
else
{
$sock->connect($server_host, $server_port);
}
$sock->set_login("gebruikersnaam",wachtwoord);
$sock->query(/CMD_API_ACCOUNT_USER,
array(
username => $username, // The Users username. 4-8 characters, alphanumeric
email => $email, // A valid email address
passwd => $pass, // The Users password. 5+ characters, ascii
passwd2 => $pass, // Password double check. 5+ characters, ascii
domain => domain.com, // A valid domain name in the form: domain.com
package => $package, // One of the User packages created by the Reseller
ip => ip van reseller;
notify => yes,
action => create,
add => Submit
));
}
echo "User $username created
";
$Tekst =
Beste gebruiker,
Uw hosting pakket is aangemaak.
;
$Tekst .= Account details
Hosting pakket: Webhosting #1
Login Details
Gebruikersnaam: .$username.
Wachtwoord: .$pass.
Controle panel: http://87.236.102.68:.$server_port.;
mail($email,Test| Bestelling: Webhosting pakket is klaar voor gebruik!, $Tekst, "From: No-reply@domain.com
Content-Type: text/html; charset=iso-8859-1");
?>