@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: joerg |
|
| 5 | - * Date: 14.02.16 |
|
| 6 | - * Time: 20:31 |
|
| 7 | - * copied and modified from https://github.com/inwx/php-client |
|
| 8 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: joerg |
|
| 5 | + * Date: 14.02.16 |
|
| 6 | + * Time: 20:31 |
|
| 7 | + * copied and modified from https://github.com/inwx/php-client |
|
| 8 | + */ |
|
| 9 | 9 | namespace Bingemer\InwxBundle\Classes; |
| 10 | 10 | |
| 11 | 11 | class Domrobot |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | private $clTRID = null; |
| 18 | 18 | |
| 19 | 19 | private $_ver = "2.4"; |
| 20 | - private $_cachedir; |
|
| 20 | + private $_cachedir; |
|
| 21 | 21 | private $_cookiefile = NULL; |
| 22 | 22 | private $loginResult = NULL; |
| 23 | 23 | |
@@ -30,32 +30,32 @@ discard block |
||
| 30 | 30 | $this->loginResult = $this->login($username, $password, $sharedSecret); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - public function createRecord($name, $ip, $domain = 'somedomainnameyouwishtoupgrade.de', $type = 'A') |
|
| 34 | - { |
|
| 35 | - if (strpos($name, $domain) === false) { |
|
| 36 | - $name = $name.".".$domain; |
|
| 37 | - } |
|
| 38 | - try { |
|
| 39 | - $result = $this->call('nameserver', 'createRecord', array( |
|
| 40 | - 'domain' => $domain, |
|
| 41 | - 'type' => $type, |
|
| 42 | - 'name' => $name, |
|
| 43 | - 'content' => $ip |
|
| 44 | - )); |
|
| 45 | - return $result; |
|
| 46 | - } catch (\Exception $e) { |
|
| 47 | - return $e->getMessage(); |
|
| 48 | - } |
|
| 49 | - } |
|
| 33 | + public function createRecord($name, $ip, $domain = 'somedomainnameyouwishtoupgrade.de', $type = 'A') |
|
| 34 | + { |
|
| 35 | + if (strpos($name, $domain) === false) { |
|
| 36 | + $name = $name.".".$domain; |
|
| 37 | + } |
|
| 38 | + try { |
|
| 39 | + $result = $this->call('nameserver', 'createRecord', array( |
|
| 40 | + 'domain' => $domain, |
|
| 41 | + 'type' => $type, |
|
| 42 | + 'name' => $name, |
|
| 43 | + 'content' => $ip |
|
| 44 | + )); |
|
| 45 | + return $result; |
|
| 46 | + } catch (\Exception $e) { |
|
| 47 | + return $e->getMessage(); |
|
| 48 | + } |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - public function updateRecord($id, $ip) |
|
| 52 | - { |
|
| 51 | + public function updateRecord($id, $ip) |
|
| 52 | + { |
|
| 53 | 53 | $result = $this->call('nameserver','updateRecord', array( |
| 54 | 54 | 'id' => $id, |
| 55 | 55 | 'content' => $ip |
| 56 | 56 | )); |
| 57 | - return $result; |
|
| 58 | - } |
|
| 57 | + return $result; |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | public function login($username, $password, $sharedSecret = null) |
| 61 | 61 | { |