mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Added fix for updating apex domains (mydomain.com) with gratisdns (#1806)
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user