{"id":36972251,"url":"https://github.com/sandwave-io/dme-sdk-php","last_synced_at":"2026-01-13T21:55:44.352Z","repository":{"id":41876163,"uuid":"348090728","full_name":"sandwave-io/dme-sdk-php","owner":"sandwave-io","description":"This is an API client library for the DNS Made Easy API. This is a fork of the official client at https://github.com/DNSMadeEasy/dme-php-sdk","archived":false,"fork":false,"pushed_at":"2024-10-10T13:52:35.000Z","size":592,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-11T18:00:10.104Z","etag":null,"topics":["client","dme","dns-made-easy","php","sdk","sdk-php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandwave-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-15T19:02:38.000Z","updated_at":"2024-10-10T13:47:36.000Z","dependencies_parsed_at":"2022-08-11T20:00:41.821Z","dependency_job_id":null,"html_url":"https://github.com/sandwave-io/dme-sdk-php","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sandwave-io/dme-sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandwave-io%2Fdme-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandwave-io%2Fdme-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandwave-io%2Fdme-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandwave-io%2Fdme-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandwave-io","download_url":"https://codeload.github.com/sandwave-io/dme-sdk-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandwave-io%2Fdme-sdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","dme","dns-made-easy","php","sdk","sdk-php"],"created_at":"2026-01-13T21:55:44.266Z","updated_at":"2026-01-13T21:55:44.336Z","avatar_url":"https://github.com/sandwave-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://user-images.githubusercontent.com/60096509/91668964-54ecd500-eb11-11ea-9c35-e8f0b20b277a.png)](https://sandwave.io)\n\n# DNS Made Easy PHP Client Library\n\n[![Codecov](https://codecov.io/gh/sandwave-io/dme-sdk-php/branch/main/graph/badge.svg?token=CDT60O8O03)](https://app.codecov.io/gh/sandwave-io/dme-sdk-php)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sandwave-io/dme-sdk-php/test.yml?branch=main)](https://github.com/sandwave-io/dme-sdk-php/actions)\n[![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/sandwave-io/dns-made-easy)](https://packagist.org/packages/sandwave-io/dns-made-easy)\n[![Packagist PHP Version Support](https://img.shields.io/packagist/v/sandwave-io/dns-made-easy)](https://packagist.org/packages/sandwave-io/dns-made-easy)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/sandwave-io/dns-made-easy)](https://packagist.org/packages/sandwave-io/dns-made-easy)\n\nThis package is a fork from the original \u003ca href=\"https://github.com/DNSMadeEasy/dme-php-sdk\"\u003eDNSMadeEasy/dme-php-sdk\u003c/a\u003e.\n\nThis is an API client library for the [DNS Made Easy](https://www.dnsmadeeasy.com) API.\n\nMore information about the API may be found in the [official API documentation](https://api-docs.dnsmadeeasy.com/).\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n\n## Installation\n\nThe easiest way to install and use this client library is using Composer. The following command will add the library to your application and install it from Packagist.\n\n```bash\ncomposer require sandwave-io/dns-made-easy\n```\n\n## Getting Started\n\nYou will need a DNS Made Easy account and API credentials. You can get an account at the [DNS Made Easy website](https://www.dnsmadeeasy.com). There is an API sandbox available, you can create a [new account here](https://sandbox.dnsmadeeasy.com/account/new).\n\nWith the package installed through composer, you just need to create the client and set the API key and secret key.\n\n```php\n$client = new \\DnsMadeEasy\\Client;\n$client-\u003esetApiKey(API_KEY);\n$client-\u003esetSecretKey(SECRET_KEY);\n```\n\nYou may now use the client to query the API retrieve objects. Usage is documented in GitHub in the docs directory.\n\n### Using the Sandbox\n\nYou can tell the client to use the sandbox API endpoint by using the `setEndpoint` method:\n\n```php\n$client-\u003esetEndpoint('https://api.sandbox.dnsmadeeasy.com/V2.0');\n```\n\n### Putting it all together\n\nPutting this together, it's time for the API equivalent of Hello World. Let's get a list of your domains.\n\n```php\n\u003c?php\n\n// Create a new client and set our credentials\n$client = new \\DnsMadeEasy\\Client;\n$client-\u003esetApiKey(\"Your API Key\");\n$client-\u003esetSecretKey(\"Your Secret Key\");\n\n// Configure it to use the Sandbox\n$client-\u003esetEndpoint('https://api.sandbox.dnsmadeeasy.com/V2.0');\n\n// Create a new domain\n$domain = $client-\u003edomains-\u003ecreate();\n$domain-\u003ename = 'mydomain.example.com';\n$domain-\u003esave();\n\n// Print out our domain\necho json_encode($domain, JSON_PRETTY_PRINT);\n\n// Now fetch a list of our domains\n$domains = $client-\u003edomains-\u003epaginate();\nforeach ($domains as $domain) {\n    echo json_encode($domain, JSON_PRETTY_PRINT);\n}\n```\n\nThere are more examples further down of using the API client SDK.\n\n## Configuration\n\nThere are additional configuration options you can use with the client as well as just specifying the sandbox.\n\n### Logging\n\nYou can specify a logger that implements the [PSR-3 Logger](https://www.php-fig.org/psr/psr-3/) specification such as MonoLog. The client is a `LoggerAwareInterface` and the logger can be specified either in the constructor or via a method call.\n\n```php\n$client = new \\DnsMadeEasy\\Client(null, null, $myLogger);\n```\n\n```php\n$client-\u003esetLogger($myLogger);\n```\n\nIf no logger is specified then a null logger that does nothing will be used.\n\n### Custom HTTP Client\n\nIf you need additional configuration for HTTP requests in your application, for example to specify a proxy server or if you want to use your own HTTP client matching the [PSR-18 HTTP Client](https://www.php-fig.org/psr/psr-18/) specification.\n\nYou can specify the client using either the constructor or via a method call.\n\n```php\n$client = new \\DnsMadeEasy\\Client($myClient);\n```\n\n```php\n$client-\u003esetHttpClient($myClient);\n```\n\n## Examples\n\nFull documentation of the library methods are in the docs folder.\n\n### Managers\n\nManagers are used for managing your access to resources on the API, including creating new resources and fetching existing ones from the API. These can be accessed as properties on the client.\n\n```php\n// Fetch our manager\n$domainsManager = $client-\u003edomains;\n// Ask our manager for the domain\n$domain = $domainsManager-\u003eget(1234);\n```\n\nManages are also used to create new objects.\n\n```php\n// Create a new domain\n$domain = $client-\u003edomains-\u003ecreate();\n$domain-\u003ename = 'example.com';\n\n// Save the domain\n$domain-\u003esave();\n```\n\nThe domain is not saved on the API until you call `$domain-\u003esave()`.\n\nMultiple objects can be fetched using the `paginate()` method on the manager. You can specify the page number and the number of items per page.\n\n```php\n// Return the 4th page of results with the default page size\n$client-\u003edomains-\u003epaginate(4);\n\n// Return the first page of 50 results\n$client-\u003edomains-\u003epaginate(1, 50);\n```\n\n### Models\n\nThe models themselves follow an Active Record pattern. Properties can be updated and `save()` called on the model to update the API.\n\n```php\n// Fetch an existing domain with the ID 1234\n$domain = $client-\u003edomains-\u003eget(1234);\n// Update the gtdEnabled property\n$domain-\u003egtdEnabled = true;\n// Save the domain object on the API\n$domain-\u003esave();\n```\n\nYou can delete an object by calling `delete()` on it:\n\n```php\n$domain = $client-\u003edomains-\u003eget(1234);\n$domain-\u003edelete();\n```\n\n### Creating a domain and records\n\nThis example creates a new domain and adds records to it.\n\n```php\n// Create the client\n$client = new \\DnsMadeEasy\\Client;\n$client-\u003esetApiKey(API_KEY);\n$client-\u003esetSecretKey(SECRET_KEY);\n\n// Create the domain\n$domain = $client-\u003edomains-\u003ecreate();\n$domain-\u003ename = 'example.com';\n$domain-\u003esave();\n\n// Create a record on the domain\n$record = $domain-\u003erecords-\u003ecreate();\n$record-\u003etype = \\DnsMadeEasy\\Enums\\RecordType::A;\n$record-\u003ename = 'www';\n$record-\u003evalue = '192.0.2.1';\n$record-\u003esave();\n\n// Get a list of all domains\n$domains = $client-\u003edomains-\u003epaginate();\nforeach ($domains as $domain) {\n    print_r(json_encode($domain, JSON_PRETTY_PRINT));\n}\n```\n\n## Contributing\n\nWhen contributing to this project, you can run the following quality checks:\n\n```bash\n$ vendor/bin/phpstan\n```\n\n```bash\n$ vendor/bin/phpunit\n```\n\n```bash\n$ vendor/bin/php-cs-fixer fix\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandwave-io%2Fdme-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandwave-io%2Fdme-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandwave-io%2Fdme-sdk-php/lists"}