summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/dyndns.class34
-rwxr-xr-xusr/local/www/services_dyndns.php4
-rw-r--r--usr/local/www/services_dyndns_edit.php4
3 files changed, 38 insertions, 4 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index ebe300a..d980f4b 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -20,6 +20,7 @@
* - Namecheap (namecheap.com)
* - HE.net (dns.he.net)
* - HE.net Tunnelbroker IP update (ipv4.tunnelbroker.net)
+ * - SelfHost (selfhost.de)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with CURL Library
@@ -53,6 +54,7 @@
* Namecheap - Last Tested: 31 August 2010
* HE.net - Last Tested: NEVER
* HE.net Tunnel - Last Tested: 28 June 2011
+ * SelfHost - Last Tested: 26 December 2011
* +====================================================+
*
* @author E.Kristensen
@@ -160,6 +162,7 @@
case 'opendns':
case 'namecheap':
case 'he-net':
+ case 'selfhost':
$this->_update();
break;
case 'he-net-tunnelbroker':
@@ -407,6 +410,20 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, $server . 'tid=' . $this->_dnsHost);
break;
+ case 'selfhost':
+ $needsIP = FALSE;
+ //log_error("SelfHost: DNS update() starting.");
+ if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") $this->_dnsWildcard = "ON";
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
+ $server = "https://carol.selfhost.de/nic/update";
+ $port = "";
+ if($this->_dnsServer)
+ $server = $this->_dnsServer;
+ if($this->_dnsPort)
+ $port = ":" . $this->_dnsPort;
+ curl_setopt($ch, CURLOPT_URL, $server .$port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard='.$this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');
+ break;
default:
break;
}
@@ -785,6 +802,23 @@
$this->_debug($data);
}
break;
+ case 'selfhost':
+ if (preg_match('/notfqdn/i', $data)) {
+ $status = "phpDynDNS: (Error) Not A FQDN!";
+ } else if (preg_match('/nochg/i', $data)) {
+ $status = "phpDynDNS: (Success) No Change In IP Address";
+ $successful_update = true;
+ } else if (preg_match('/good/i', $data)) {
+ $status = "phpDynDNS: (Success) IP Address Changed Successfully! (".$this->_dnsIP.")";
+ $successful_update = true;
+ } else if (preg_match('/noauth/i', $data)) {
+ $status = "phpDynDNS: (Error) User Authorization Failed";
+ } else {
+ $status = "phpDynDNS: (Unknown Response)";
+ log_error("phpDynDNS: PAYLOAD: {$data}");
+ $this->_debug($data);
+ }
+ break;
}
if($successful_update == true) {
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 13664a0..28eefb0 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -114,8 +114,8 @@ include("head.inc");
</td>
<td class="listlr">
<?php
- $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker");
- $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker");
+ $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost");
+ $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost");
$j = 0; for ($j = 0; $j < count($vals); $j++)
if ($vals[$j] == $dyndns['type']) {
echo htmlspecialchars($types[$j]);
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index 93ffbf7..136d654 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -159,8 +159,8 @@ include("head.inc");
<td width="78%" class="vtable">
<select name="type" class="formselect" id="type">
<?php
- $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker");
- $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker");
+ $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost");
+ $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost");
$j = 0; for ($j = 0; $j < count($vals); $j++): ?>
<option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected";?>>
<?=htmlspecialchars($types[$j]);?>
OpenPOWER on IntegriCloud