summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/dyndns.class24
-rwxr-xr-xusr/local/www/services_dyndns.php4
2 files changed, 22 insertions, 6 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 2d6a5b2..8b74a5a 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -39,15 +39,15 @@
*
* @author E.Kristensen
* @link http://www.idylldesigns.com/projects/phpdns/
- * @version 0.6
- * @updated 17 July 05 at 16:49:23 GMT
+ * @version 0.7
+ * @updated 1 August 05 at 21:02:42 GMT
*
*/
class updatedns {
var $_cacheFile = '/var/etc/dyndns.cache';
var $_debugFile = '/var/etc/dyndns.debug';
- var $_UserAgent = 'User-Agent: phpDynDNS/0.4';
+ var $_UserAgent = 'User-Agent: phpDynDNS/0.7';
var $_errorVerbosity = 0;
var $_dnsService;
var $_dnsUser;
@@ -193,13 +193,24 @@
curl_close($ch);
$this->_checkStatus($data);
break;
- case 'dyns';
+ case 'dyns':
$needsIP = FALSE;
curl_setopt($ch, CURLOPT_URL, 'http://www.dyns.cx/postscript011.php?username='.$this->_dnsUser.'&password='.$this->_dnsPass.'&host='.$this->_dnsHost);
$data = curl_exec($ch);
curl_close($ch);
$this->_checkStatus($data);
break;
+ case 'ods':
+ $needsIP = FALSE;
+ $post_data['LOGIN'] = $this->_dnsUser." = ".$this->_dnsPass;
+ $post_data['DELLR'] = $this->_dnsHost;
+ $post_data['ADDRR'] = $this->_dnsHost." A ".$this->dnsIP;
+ curl_setopt($ch, CURLOPT_URL, 'http://ods.org:7070/update');
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
+ $data = curl_exec($ch);
+ curl_close($ch);
+ $this->_checkStatus($data);
+ break;
default:
break;
}
@@ -360,6 +371,8 @@
$this->_debug($data);
}
break;
+ case 'ods':
+ break;
}
$this->status = $status;
log_error($status);
@@ -456,6 +469,9 @@
case 'dyns':
$time = '2419200';
break;
+ case 'ods':
+ $time = '2419200';
+ break;
}
/* If IP addresses are different or 28 days have passed update record */
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 835b70b..99f3cd8 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -176,8 +176,8 @@ function enable_change(enable_change) {
<select name="type" class="formfld" id="type">
<?php #$types = explode(",", "DynDNS,DHS,ODS,DyNS,HN.ORG,ZoneEdit,GNUDip,DynDNS (static),DynDNS (custom),easyDNS,EZ-IP,TZO");
#$vals = explode(" ", "dyndns dhs ods dyns hn zoneedit gnudip dyndns-static dyndns-custom easydns ezip tzo");
- $types = explode(",", "DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,HN.ORG,ZoneEdit,easyDNS,No-IP");
- $vals = explode(" ", "dyndns dyndns-static dyndns-custom dhs dyns hn zoneedit easydns noip");
+ $types = explode(",", "DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,HN.ORG,ZoneEdit,easyDNS,No-IP,ODS.org");
+ $vals = explode(" ", "dyndns dyndns-static dyndns-custom dhs dyns hn zoneedit easydns noip ods");
$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