Revision 6c07db48
Added by Phil Davis about 10 years ago
etc/inc/dyndns.class | ||
---|---|---|
595 | 595 |
/* Setting Variables */ |
596 | 596 |
$hostname = "{$this->_dnsHost}."; |
597 | 597 |
$ZoneID = $this->_dnsZoneID; |
598 |
$AccessKeyId=$this->_dnsUser;
|
|
599 |
$SecretAccessKey=$this->_dnsPass;
|
|
600 |
$NewIP=$this->_dnsIP;
|
|
601 |
$NewTTL=$this->_dnsTTL;
|
|
598 |
$AccessKeyId = $this->_dnsUser;
|
|
599 |
$SecretAccessKey = $this->_dnsPass;
|
|
600 |
$NewIP = $this->_dnsIP;
|
|
601 |
$NewTTL = $this->_dnsTTL;
|
|
602 | 602 |
|
603 | 603 |
/* Include Route 53 Library Class */ |
604 | 604 |
require_once('/etc/inc/r53.class'); |
... | ... | |
623 | 623 |
|
624 | 624 |
/* Get IP for your hostname in Route 53 */ |
625 | 625 |
if (false !== ($a_result = SearchRecords($records['ResourceRecordSets'], "$hostname"))) { |
626 |
$OldTTL=$a_result[0][TTL];
|
|
627 |
$OldIP=$a_result[0][ResourceRecords][0];
|
|
626 |
$OldTTL = $a_result[0][TTL];
|
|
627 |
$OldIP = $a_result[0][ResourceRecords][0];
|
|
628 | 628 |
} else { |
629 |
$OldIP="";
|
|
629 |
$OldIP = "";
|
|
630 | 630 |
} |
631 | 631 |
|
632 | 632 |
/* Check if we need to update DNS Record */ |
... | ... | |
1231 | 1231 |
$lines = count($data)-1; |
1232 | 1232 |
|
1233 | 1233 |
// loop over the lines |
1234 |
for ($pos=0; ($successful_update || $pos == 0) && $pos < $lines; $pos++) {
|
|
1234 |
for ($pos = 0; ($successful_update || $pos == 0) && $pos < $lines; $pos++) {
|
|
1235 | 1235 |
$resp = $data[$pos]; |
1236 | 1236 |
if (preg_match('/UAUTH/i', $resp)) { |
1237 | 1237 |
$status = "DynDNS: The username specified is not authorized to update this hostname and domain."; |
Also available in: Unified diff
Code spacing
and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.