@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | protected function setIniFileDomain($apidomain = null) |
| 51 | 51 | { |
| 52 | 52 | preg_match("/(?!.{253})((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.){1,126}+[A-Za-z]{2,6}/", $apidomain, $domainReturn); |
| 53 | - $domainReturn[0] = str_replace('.', '-', $domainReturn[0]); |
|
| 53 | + $domainReturn[0] = str_replace('.', '-', $domainReturn[0]); |
|
| 54 | 54 | |
| 55 | 55 | $this->iniFileDomain = $domainReturn[0] . '.ini'; |
| 56 | 56 | |
@@ -152,42 +152,42 @@ discard block |
||
| 152 | 152 | exit('something went wrong 6'); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - foreach($result["resData"]["record"] as $value) |
|
| 156 | - { |
|
| 157 | - if($value['type'] == "A") |
|
| 158 | - { |
|
| 159 | - $this->IP4['id'] = $value['id']; |
|
| 160 | - $this->IP4['oldip'] = $value['content']; |
|
| 161 | - } |
|
| 162 | - if($value['type'] == "AAAA") |
|
| 163 | - { |
|
| 164 | - $this->IP6['id'] = $value['id']; |
|
| 165 | - $this->IP6['oldip'] = $value['content']; |
|
| 166 | - } |
|
| 167 | - } |
|
| 155 | + foreach($result["resData"]["record"] as $value) |
|
| 156 | + { |
|
| 157 | + if($value['type'] == "A") |
|
| 158 | + { |
|
| 159 | + $this->IP4['id'] = $value['id']; |
|
| 160 | + $this->IP4['oldip'] = $value['content']; |
|
| 161 | + } |
|
| 162 | + if($value['type'] == "AAAA") |
|
| 163 | + { |
|
| 164 | + $this->IP6['id'] = $value['id']; |
|
| 165 | + $this->IP6['oldip'] = $value['content']; |
|
| 166 | + } |
|
| 167 | + } |
|
| 168 | 168 | |
| 169 | 169 | return; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - protected function inwxSetNameserverInfo($type = null) |
|
| 172 | + protected function inwxSetNameserverInfo($type = null) |
|
| 173 | 173 | { |
| 174 | 174 | $object = "nameserver"; |
| 175 | 175 | $methode = "updateRecord"; |
| 176 | 176 | |
| 177 | 177 | $params = array(); |
| 178 | 178 | |
| 179 | - if($type == 'ipv4') |
|
| 180 | - { |
|
| 181 | - $params['id'] = $this->IP4['id']; |
|
| 182 | - $params['content'] = $this->IP4['newip']; |
|
| 183 | - } |
|
| 184 | - elseif($type == 'ipv6') |
|
| 185 | - { |
|
| 186 | - $params['id'] = $this->IP6['id']; |
|
| 187 | - $params['content'] = $this->IP6['newip']; |
|
| 188 | - } |
|
| 189 | - else |
|
| 190 | - exit('something went wrong 9'); |
|
| 179 | + if($type == 'ipv4') |
|
| 180 | + { |
|
| 181 | + $params['id'] = $this->IP4['id']; |
|
| 182 | + $params['content'] = $this->IP4['newip']; |
|
| 183 | + } |
|
| 184 | + elseif($type == 'ipv6') |
|
| 185 | + { |
|
| 186 | + $params['id'] = $this->IP6['id']; |
|
| 187 | + $params['content'] = $this->IP6['newip']; |
|
| 188 | + } |
|
| 189 | + else |
|
| 190 | + exit('something went wrong 9'); |
|
| 191 | 191 | |
| 192 | 192 | $result = $this->domrobot->call($object, $methode, $params); |
| 193 | 193 | |
@@ -200,8 +200,8 @@ discard block |
||
| 200 | 200 | exit('something went wrong 10'); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | - if(OUTPUT) |
|
| 204 | - echo('good'); |
|
| 203 | + if(OUTPUT) |
|
| 204 | + echo('good'); |
|
| 205 | 205 | |
| 206 | 206 | return; |
| 207 | 207 | } |
@@ -212,17 +212,17 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $this->inwxGetNameserverInfo(); |
| 214 | 214 | |
| 215 | - if(filter_var($ipv4, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) |
|
| 216 | - { |
|
| 217 | - $this->IP4['newip'] = $ipv4; |
|
| 218 | - $this->inwxSetNameserverInfo('ipv4'); |
|
| 219 | - } |
|
| 215 | + if(filter_var($ipv4, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) |
|
| 216 | + { |
|
| 217 | + $this->IP4['newip'] = $ipv4; |
|
| 218 | + $this->inwxSetNameserverInfo('ipv4'); |
|
| 219 | + } |
|
| 220 | 220 | |
| 221 | - if(filter_var($ipv6, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) |
|
| 222 | - { |
|
| 223 | - $this->IP6['newip'] = $ipv6; |
|
| 224 | - $this->inwxSetNameserverInfo('ipv6'); |
|
| 225 | - } |
|
| 221 | + if(filter_var($ipv6, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) |
|
| 222 | + { |
|
| 223 | + $this->IP6['newip'] = $ipv6; |
|
| 224 | + $this->inwxSetNameserverInfo('ipv6'); |
|
| 225 | + } |
|
| 226 | 226 | |
| 227 | 227 | $this->inwxLogout(); |
| 228 | 228 | |