At this time I have the following code:
I get this in return:
This is from the API
CMD_API_FILE_MANAGER
View a protected directory's settings.
action=protect
path=/domains/domain.com/public_html/directory
returns:
enabled=yes|no
name=protected name (eg, 'members area')
1=user1
2=user2 etc... returns the user list too.
CMD_API_FILE_MANAGER
Set a protected directories settings and add users.
action=protect
path=/domain/etc..
enabled=yes (don't pass 'enabled' at all for "no")
name=members area
user=username (you can leave this blank if you only want to set the enabled or name).
passwd=pass
passwd2=pass
In everyway the CMD_API_FILE_MANAGER does view the directory instead of setting the directory to protected.
PHP:
$path = "/domains/mydomain.com/public_html/test/";
$sock->query('/CMD_API_FILE_MANAGER',
array(
"action" => "protect",
"path" => $path,
"enabled" => "yes",
"name" => "test_name",
"user" => "test_user",
"passwd" => "test_pass",
"passwd2" => "test_pass"
));
$result = $sock->fetch_parsed_body();
print_r($result);
I get this in return:
Code:
Array ( [enabled] => no [name] => )
This is from the API
CMD_API_FILE_MANAGER
View a protected directory's settings.
action=protect
path=/domains/domain.com/public_html/directory
returns:
enabled=yes|no
name=protected name (eg, 'members area')
1=user1
2=user2 etc... returns the user list too.
CMD_API_FILE_MANAGER
Set a protected directories settings and add users.
action=protect
path=/domain/etc..
enabled=yes (don't pass 'enabled' at all for "no")
name=members area
user=username (you can leave this blank if you only want to set the enabled or name).
passwd=pass
passwd2=pass
In everyway the CMD_API_FILE_MANAGER does view the directory instead of setting the directory to protected.