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