From ed3cf51ee4b86ea2d6ca7f467ee6975a0bd12fcd Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Sat, 16 Jul 2005 18:45:36 +0000 Subject: [PATCH] Added Debugging Code and Changed the UserAgent --- etc/inc/dyndns.class | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index 714c7d45d3..47aab55cf9 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -49,7 +49,8 @@ class updatedns { var $_changeFile = '/var/etc/dyndns.cache'; - var $_UserAgent = 'User-Agent: php-dns-updater/0.4'; + var $_debugFile = '/var/etc/dyndns.debug'; + var $_UserAgent = 'User-Agent: phpDynDNS/0.4'; var $_errorVerbosity = 0; var $_dnsService; var $_dnsUser; @@ -184,6 +185,7 @@ $status = "phpDynDNS: (Success) No Change In IP Address"; } else { $status = "phpDynDNS: (Unknown Response)"; + $this->_debug($data); } break; case 'dhs': @@ -400,6 +402,15 @@ } } + + + function _debug ($data) { + $string = date('m-d-y h:i:s').' - ['.$this->dnsService.'] - '.$data.'\n'; + $file = fopen($this->_debugFile, 'a'); + fwrite($file, $string); + fclose($file); + } + } ?> \ No newline at end of file