Automatic registration of users via a remoting framework

Hi.
I want to create a simple auto register users. Automatically when the registration should be created a web site and ftp user with the same name, for example "legendarno".
Specially pay 5 euro ISPConfig 3 Manual (very little information about the possibilities of the remoting framework) , studied all the examples in remoting_client / examples.ISPConfig Version: 3.0.3.2
In this forum, found the script and modified it a bit :

Help me please-
How do I change client id in the table web_domain or report while adding web_domain current id?
Or how to properly make the automatic registration with the terms of Automatic creation of records in the table web_domain and ftp_user

Till, I'm sorry but I can not in any way convey client_group_id. always displayed web_domain client0 Could you as an example of my script to show how to do properly. I'm not good at programming, unfortunately: (