@@ -148,6 +148,63 @@ public function checkDomain($domain)
148148 return $ this ->call ('Check_Domain ' , ['domain ' => $ domain ]);
149149 }
150150
151+ /**
152+ * Create a new domain
153+ *
154+ * @link https://subreg.cz/manual/?cmd=Create_Domain Order: Create_Domain
155+ *
156+ * @param string $domain
157+ * @param string $registrantID
158+ * @param string $contactsAdminID
159+ * @param string $contactsTechID
160+ * @param string $authID
161+ * @param array $nsHosts Hostnames of nameservers: ['ns.domain.cz','ns2.domain.cz']
162+ * @param string $nsset Nameserver Set (only for FRED registries (.CZ,.EE,...))
163+ * @param int $period
164+ *
165+ * @return array
166+ */
167+ public function registerDomain ($ domain , $ registrantID , $ contactsAdminID ,
168+ $ contactsTechID , $ authID , $ nsHosts = [],
169+ $ nsset = null , $ period = 1 )
170+ {
171+
172+ foreach ($ nsHosts as $ host ) {
173+ $ ns []["hostname " ] = $ host ;
174+ }
175+
176+ $ order = array (
177+ "domain " => $ domain ,
178+ "type " => "Create_Domain " ,
179+ "params " => array (
180+ "registrant " => array (
181+ "id " => $ registrantID ,
182+ ),
183+ "contacts " => array (
184+ "admin " => array (
185+ "id " => $ contactsAdminID ,
186+ ),
187+ "tech " => array (
188+ "id " => $ contactsTechID ,
189+ ),
190+ ),
191+ "ns " => array (
192+ "hosts " => $ ns ,
193+ ),
194+ "params " => array (
195+ "authid " => $ authID ,
196+ ),
197+ "period " => $ period
198+ )
199+ );
200+
201+ if (!empty ($ nsset )) {
202+ $ order ['params ' ]['ns ' ]['nsset ' ] = $ nsset ;
203+ }
204+
205+ return $ this ->call ('Make_Order ' , ['order ' => $ order ]);
206+ }
207+
151208 /**
152209 * Get all domains from your account
153210 *
0 commit comments