Why wouldn#39;t dns_get_record show CNAMEs when I KNOW they exist?(当我知道 CNAME 存在时,为什么 dns_get_record 不显示它们?)
问题描述
我正在 PHP 中使用 DNS 记录查找,但遇到了一些令人困惑的问题.我查找了 2 个不同的域,每个域都使用不同的主机和不同的权威名称服务器.我肯定知道这两个域都有 CNAME.
I'm playing with DNS record lookup in PHP and am running into something confusing. I've looked up 2 different domains each using different hosts and different authoritative name servers. Both of these domains I know for certain have CNAMES.
我已使用此在线工具查找 DNS 记录:http://network-tools.com/一>我还使用 PHP 的 dns_get_record 查找了它们.A、NS、SOA、MX等都回来了.但没有 CNAMES.我得到假/空数组.
I've looked up DNS records using this online tool: http://network-tools.com/ I've also looked them up using PHP's dns_get_record. A, NS, SOA, MX, etc. all come back. But no CNAMES. I get false/empty array.
在这两种情况下,我都可以登录这些域的 DNS 控制并查看 CNAME.
In both cases I can log into the DNS control for these domains and see the CNAMES.
为什么会发生这种情况?目标是允许在将客户的域更改为我公司的名称服务器之前查找和保存所有 DNS 记录(以便我们不会意外地在外部托管电子邮件设置).像 pop.domain.com 这样的 CNAMES 在这里相当重要,但我找不到任何查询会承认它们存在.
Why in the world would this be happening? The goal is to allow lookup and saving of all of the DNS records at the time prior to changing a client's domains to my company's nameservers (so that we don't accidentally externally hosted e-mail settings). CNAMES like pop.domain.com are going to be reasonably critical here, but no lookup I can find will admit they exist.
真正的问题当然是 PHP 函数没有返回它们,因为这正是我需要的地方.
The real problem is of course the PHP function not returning them, since that's really where I need it.
但是我在别处找不到它们让我很困惑.尤其是因为我在可以添加和删除 DNS 记录的地方直接查看它们.在这里说:
But it confuses me that I can't find them elsewhere. Especially because I'm looking right at them in the place where I can add and remove DNS records. Says right here:
pop.domain.com CNAME pop.secureserver.net 0 900
pop.domain.com CNAME pop.secureserver.net 0 900
(PHP 版本 5.2.6Linux 2.6.9-67.0.15.plus.c4smp)
(PHP Version 5.2.6 Linux 2.6.9-67.0.15.plus.c4smp)
推荐答案
我想我已经找到原因了.我相信这与每个线程的区域传输"有关 是否可以找到给定域名的所有 DNS 子域?.
I think I've figured out why. I believe this has to do with "Zone Transfers" per this thread Is it possible to find all DNS subdomains for a given domain name?.
我期望 CNAME 查找的功能与 A、NS、MX 相同--其他一切.(几乎是不切实际的期望...)
What I expect is the same functionality from the CNAME lookup as A, NS, MX--EVERYTHING ELSE. (Hardly an unrealistic expectation...)
dns_get_record("domain.com", DNS_CNAME, $authns_cname, $addtl_cname);
我希望取回一个数组,其中包含为 domain.com 设置的所有 CNAME.这不是发生的事情.
I expect to get back an array populated with all the CNAMES set up for domain.com. That's not what happens.
- 我可以取回单个 CNAME如果是www.domain.com"的条目我传入的域,并且有一个 CNAME.
- 我可以得到支持单个 CNAME 条目"*.domain.com" 如果这是域我传入了,它有一个 CNAME.
- 我不能回来字面上所有的 CNAME 记录,以便保存所有 CNAMES/子域/三级域的记录用于 domain.com、通配符搜索或不是.
- I can get back the single CNAME entry for "www.domain.com" if that is the domain I pass in and there is a CNAME for it.
- I can get back the single CNAME entry for "*.domain.com" if that is the domain I pass in and there is a CNAME for it.
- I cannot get back literally all the CNAME records in order to save a record of all the CNAMES/subdomains/third level domains for domain.com, wildcard search or not.
我想我只需要正确表达这个问题(第 15 次排列找到了有希望的答案).我假设两个名称服务器(Dreamhost 和我公司的)都受到保护".尽管在我看来,与其他 DNS 记录相比,这并不是非常敏感的信息.
I suppose I just had to phrase the question right (15th permutation found that promising answer). I assume both name servers (Dreamhost and my company's) are "protected" against this. Though it seems to me not to be terribly sensitive information in comparison to the rest of the DNS records.
这篇关于当我知道 CNAME 存在时,为什么 dns_get_record 不显示它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:当我知道 CNAME 存在时,为什么 dns_get_record 不显示它们?
基础教程推荐
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- HTTP 与 FTP 上传 2021-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01