const ERROR_FOLDER_UNMOUNT = 3;
+ const ERROR_SUBDOMAIN_DNS = 6;
+
public function __construct(IServer $server, $rootPath = null)
{
parent::__construct($server);
}
public function checkConnexion($data = []) {
+ $ipHosting = $data['protocol'] === 'hosting' ? gethostbyname('hosting.fluidbook.com') : gethostbyname('hosting2.fluidbook.com');
+
+ $subdomains = explode("\r\n",$data['subdomains']);
+ $subdomainsIntruder = [];
+
+ if($subdomains) {
+ foreach($subdomains as $subdomain) {
+ $ipSubdomain = gethostbyname($subdomain);
+ if($ipSubdomain === $ipHosting) {
+ continue;
+ }else {
+ $subdomainsIntruder[] = $subdomain;
+ }
+ }
+ }
+
+ if($subdomainsIntruder) {
+ $subdomainsList = implode(", ",$subdomainsIntruder);
+ return ['subdomains' => $subdomainsList];
+ }
+
if(file_exists($this->getRootPath().'status')) {
return true;
} else {