{"id":22371336,"url":"https://github.com/orlo/dns-hostname-expansion","last_synced_at":"2026-01-31T11:02:58.306Z","repository":{"id":266475919,"uuid":"898457379","full_name":"orlo/dns-hostname-expansion","owner":"orlo","description":"PHP library for expanding a DNS record into multiple hostnames ","archived":false,"fork":false,"pushed_at":"2024-12-06T08:56:18.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-19T23:00:08.990Z","etag":null,"topics":["library","php","php8"],"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/orlo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-04T12:34:47.000Z","updated_at":"2024-12-06T08:56:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5aaa5ca-9410-4c4e-b9fd-e5f961ba6150","html_url":"https://github.com/orlo/dns-hostname-expansion","commit_stats":null,"previous_names":["orlo/dns-host-expansion"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/orlo/dns-hostname-expansion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orlo%2Fdns-hostname-expansion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orlo%2Fdns-hostname-expansion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orlo%2Fdns-hostname-expansion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orlo%2Fdns-hostname-expansion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orlo","download_url":"https://codeload.github.com/orlo/dns-hostname-expansion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orlo%2Fdns-hostname-expansion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["library","php","php8"],"created_at":"2024-12-04T20:19:01.130Z","updated_at":"2026-01-31T11:02:58.301Z","avatar_url":"https://github.com/orlo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TL;DR ?\n\nElasticSearch (for example) needs a list of hosts to talk to, for instance : \n\n * https://host1:9200\n * https://host2:9200 etc\n\n\nThis allows you to have a single DNS record (e.g. in Route53) which responds with multiple A records, which then get formatted into an appropriate list, e.g\n\n * DNS record: elasticsearch.test.org resolves to 1.2.3.4, 1.2.3.5, 1.2.4.6\n * Becomes: https://1.2.3.4:9200, https://1.2.3.5:9200, https://1.2.3.6:9200\n\nThe prefix + suffix used in decoration are configurable and could be omitted.\n\n\nIn the event DNS lookup fails, we fall back to returning the passed in host - e.g. https://elasticsearch.test.org:9200\n\n# Usage\n\n * composer require orlo/dns-hostname-expansion\n * ...\n```php\n\u003c?php \nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n$hosts = \\Orlo\\DnsHostnameExpansion\\DNSLookup::expandFromDnsALookup(\"my.host.name\", \"https://\", \"9200);\n\n// e.g. [\"https://1.2.3.4:9200\",\"https://1.2.3.5:9200\"]\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forlo%2Fdns-hostname-expansion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forlo%2Fdns-hostname-expansion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forlo%2Fdns-hostname-expansion/lists"}