Http://5.2.65.165:2222/CMD_API_ACCOUNT_USER?action=create&add=submit en dan alles wat inde array staat in de url doen.
Directadmin api werkt niet?
Aarclay schreef:/me is spuit ellufEn wat als je /CMD_API_ACCOUNT_USER eens handmatig aanroept, met je gegevens uit je array als GET?

^^^^^^
Snap ik maar hoe maak ik daar een formulier van
Werkt dat? Of werkt dat niet?
Uiteraard met de waarden uit je script.
Uiteraard met de waarden uit je script.
Kan jij het niet voor me maken xD
Oburoni schreef:Wat gebeurt er als je op http://5.2.65.165:2222/CMD_API_ACCOUNT_USER?action=create&add=submit&username=Test&email=test@live.nl&passwd=test&passwd2=test&domain=test.nl&package=normal&ip=5.2.65.165Kan jij het niet voor me maken xD
klikt( en inlogt) ?
Eerst werkte hij niet maar daarna heb ik er dit van gemaakt er werkte hij http://5.2.65.165:2222/CMD_API_ACCOUNT_USER?action=create&add=submit&username=tester&email=test@live.nl&passwd=test&passwd2=test&domain=test.nl&package=Normal&ip=5.2.65.165
Met andere woorden. Je Package was verkeerd geschreven? Of...?
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]HTTPSocket.php[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$server_ip[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"5.2.65.165"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//ip van je site , wordt gebruikt voor IP:2222[/COLOR]
[COLOR= #0000BB]$admin_login[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"XXXXX"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//de gebruikersnaam van je reseller[/COLOR]
[COLOR= #0000BB]$admin_pass[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"XXXXX"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// de wachtwoord van je reseller[/COLOR]
[COLOR= #0000BB]$server_ssl[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"N"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// wil je de sites starten met http = n https=y[/COLOR]
[COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$domain[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]domain[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"."[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]domain2[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$email[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ww[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ww[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$package[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Normal"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//package van je reseller[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]action[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]action[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"add"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruiker $gebruikersnaam toevoegen op server $ip.... <br>n"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$sock[/COLOR] [COLOR= #007700]= new[/COLOR] HTTPSocket[COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$server_ssl[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]N[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]//zie line na $admin_pass voor meer uiteg[/COLOR]
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]([/COLOR][COLOR= #DD0000]"ssl://"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$server_ip[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]2222[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]([/COLOR][COLOR= #0000BB]$server_ip[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]2222[/COLOR][COLOR= #007700]);
}[/COLOR]
[COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]set_login[COLOR= #007700]([/COLOR][COLOR= #0000BB]$server_login[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$server_pass[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]/CMD_API_ACCOUNT_USER[/COLOR][COLOR= #007700],[/COLOR]
[URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
[COLOR= #DD0000]action[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]create[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]add[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]Submit[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]username[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]email[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$email[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]passwd[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$ww[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]passwd2[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$ww[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]domain[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$domain[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]package[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$package[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]ip[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$server_ip[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]notify[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]yes[/COLOR]
[COLOR= #007700]));[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]fetch_parsed_body[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]error[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"0"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<b>De gebruiker $gebruikersnaam op server $server_ip kan niet worden aangemaakt:<br>n"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]text[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br>n"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]details[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br></b>n"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruiker $gebruikersnaam maakte een server op $server_ip<br>n"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
}[/COLOR]
?>
<form action="" method="POST">
<input type="hidden" name="action" value="add">
Gebruikersnaam: <input type="text" name="gebruikersnaam"><br>
Domein:<input type="text" name="domain">.<select name="domain2"><option value="jouwdomein.nl">jouwdomein.nl</option></select><br>
Email: <input type="text" name="email"><br>
Wachtwoord: <input type="password" name="ww"><br>
<input type="submit" name="verzend" value="Verzend">
</form> toevoeging op 3 juni 2013, 20:08:51:
Aarclay was eerst.

Nu heb staat er:
Gebruiker zdgh toevoegen op server ....
en verder niks?
Gebruiker zdgh toevoegen op server ....
en verder niks?
Doe eens print_r($result); op regel 49. Wat krijg je dan?
Niks anders
Dan heb ik een vermoeden dat je array in $sock->query niet compleet is, of waardes mist.
Zet die array eens in een aparte variabele, en print_r die eens?
Zet die array eens in een aparte variabele, en print_r die eens?
Aarclay schreef:Naja als ie handmatig wel werkt?Dan heb ik een vermoeden dat je array in $sock->query niet compleet is, of waardes mist.
Zet die array eens in een aparte variabele, en print_r die eens?
