No action included ?

waldemarlima

Verified User
Joined
Jul 17, 2020
Messages
11
hello everyone !
i am trying to play with httpsocket.php with directadmin, but when i run my php script > show this message :
result = error=1&text=Error%20with%20command&details=no%20action%20included

1630294907296.png


using this php code :
<?php

include 'httpsocket.php';

$dbuser = "myreseller_exemple3";
$dbname = "myreseller_exemple3";
$dbpass = "ZMxa2fdxxxxx";

$sock = new HTTPSocket;

$sock->connect('ssl://mywebpage.com',2222);
$sock->set_login('myusername','mypass');

$sock->set_method('POST');

$sock->query('/CMD_API_DATABASES',
array(
'action' => 'Create',
'name' => $dbname,
'user' => $dbuser,
'passwd' => $dbpass,
'passwd2' => $dbpass,
));

$result = $sock->fetch_body();

echo "result = ".$result; // return empty ...

?>


what am I doing wrong ?
 
Back
Top