diff --git a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc index c21cab989..df3cb8ce1 100644 --- a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc +++ b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc @@ -883,7 +883,12 @@ class updatedns case 'gratisdns': $server = "https://admin.gratisdns.com/ddns.php"; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - list($hostname, $domain) = explode(".", $this->_dnsHost, 2); + if(substr_count($this->_dnsHost, ".") < 2) { + $domain = $this->_dnsHost; + $hostname = $this->_dnsHost; + } else { + list($hostname, $domain) = explode(".", $this->_dnsHost, 2); + } curl_setopt($ch, CURLOPT_URL, $server . '?u=' . urlencode($this->_dnsUser) . '&p=' . $this->_dnsPass . '&h=' . $this->_dnsHost . '&d=' . $domain . '&i=' . $this->_dnsIP); break; case 'ovh-dynhost':