From: soufiane Date: Mon, 29 Jul 2024 10:46:52 +0000 (+0200) Subject: wip #7008 @1:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0726845e7982e8c5e9cfcbff2c2f9410d8b78ae0;p=cubist_net.git wip #7008 @1:00 --- diff --git a/src/Transfer/Local.php b/src/Transfer/Local.php index f7e7e84..cf11e23 100644 --- a/src/Transfer/Local.php +++ b/src/Transfer/Local.php @@ -9,6 +9,8 @@ class Local extends Driver { protected $_rootPath = ''; + protected $_cache = []; + const ERROR_FOLDER_UNMOUNT = 3; public function __construct(IServer $server, $rootPath = null) @@ -74,14 +76,15 @@ class Local extends Driver } 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 { @@ -92,7 +95,7 @@ class Local extends Driver if($subdomainsIntruder) { $subdomainsList = implode(", ",$subdomainsIntruder); - return ['subdomains' => $subdomainsList]; + return ['subdomains' => $subdomainsList, 'host' => $hosting]; } if(file_exists($this->getRootPath().'status')) {