Project

General

Profile

« Previous | Next » 

Revision b4319c50

Added by Daniel Becker almost 12 years ago

Change separator as per JimP's request.

View differences:

etc/inc/dyndns.class
1111 1111
					$currentTime = time();
1112 1112
					notify_all_remote(sprintf(gettext("DynDNS updated IPv6 Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip));
1113 1113
					log_error("phpDynDNS: updating cache file {$this->_cacheFile_v6}: {$wan_ip}");
1114
					@file_put_contents($this->_cacheFile_v6, "{$wan_ip}@{$currentTime}");
1114
					@file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}");
1115 1115
				} else
1116 1116
					@unlink($this->_cacheFile_v6);
1117 1117
				conf_mount_ro();
......
1189 1189
			if ($this->_useIPv6 == true) {
1190 1190
				if (file_exists($this->_cacheFile_v6)) {
1191 1191
					$contents = file_get_contents($this->_cacheFile_v6);
1192
					list($cacheIP,$cacheTime) = explode('@', $contents);
1192
					list($cacheIP,$cacheTime) = explode('|', $contents);
1193 1193
					$this->_debug($cacheIP.'/'.$cacheTime);
1194 1194
					$initial = false;
1195 1195
					$log_error .= "Cached IPv6: {$cacheIP} ";
1196 1196
				} else {
1197 1197
					conf_mount_rw();
1198 1198
					$cacheIP = '::';
1199
					@file_put_contents($this->_cacheFile, "::@{$currentTime}");
1199
					@file_put_contents($this->_cacheFile, "::|{$currentTime}");
1200 1200
					conf_mount_ro();
1201 1201
					$cacheTime = $currentTime;
1202 1202
					$initial = true;
usr/local/www/services_dyndns.php
152 152
				echo "</font>";
153 153
			} else if (file_exists($filename_v6)) {
154 154
				$ipv6addr = get_interface_ipv6($dyndns['interface']);
155
				$cached_ipv6_s = explode("@", file_get_contents($filename_v6));
155
				$cached_ipv6_s = explode("|", file_get_contents($filename_v6));
156 156
				$cached_ipv6 = $cached_ipv6_s[0];
157 157
				if ($ipv6addr <> $cached_ipv6) 
158 158
					echo "<font color='red'>";

Also available in: Unified diff