����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 216.73.216.82 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/www/vendor/rackspace/php-opencloud/doc/services/dns/ |
Upload File : |
Records ======= Setup ----- In order to interact with the functionality of records, you must first retrieve the details of the domain itself. To do this, you must substitute `{domainId}` for your domain's ID: .. code-block:: php $domain = $service->domain('{domainId}'); Get record ---------- In order to retrieve details for a specific DNS record, you will need its **id**: .. code:: php $record = $domain->record('{recordId}'); If you do not have this ID at your disposal, you can traverse the record collection and do a string comparison (detailed below). List records ------------ This call lists all records configured for the specified domain. .. code:: php $records = $domain->recordList(); foreach ($records as $record) { printf("Record name: %s, ID: %s, TTL: %s\n", $record->name, $record->id, $record->ttl); } Query parameters ~~~~~~~~~~~~~~~~ You can pass in an array of query parameters for greater control over your search: +------------+--------------+------------------------+ | Name | Data type | Description | +============+==============+========================+ | ``type`` | ``string`` | The record type | +------------+--------------+------------------------+ | ``name`` | ``string`` | The record name | +------------+--------------+------------------------+ | ``data`` | ``string`` | Data for this record | +------------+--------------+------------------------+ Find a record ID from its name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For example: .. code:: php $records = $domain->recordList(array( 'name' => 'imap.example.com', 'type' => 'MX' )); foreach ($records as $record) { $recordId = $record->id; } Add record ---------- This call adds a new record to the specified domain: .. code:: php $record = $domain->record(array( 'type' => 'A', 'name' => 'example.com', 'data' => '192.0.2.17', 'ttl' => 3600 )); $record->create(); Please be aware that records that are added with a different hostname than the parent domain might fail silently. Modify record ------------- .. code:: php $record = $domain->record('{recordId}'); $record->ttl -= 100; $record->update(); Delete record ------------- .. code:: php $record->delete();