<small id='Ba7cq'></small><noframes id='Ba7cq'>

<i id='Ba7cq'><tr id='Ba7cq'><dt id='Ba7cq'><q id='Ba7cq'><span id='Ba7cq'><b id='Ba7cq'><form id='Ba7cq'><ins id='Ba7cq'></ins><ul id='Ba7cq'></ul><sub id='Ba7cq'></sub></form><legend id='Ba7cq'></legend><bdo id='Ba7cq'><pre id='Ba7cq'><center id='Ba7cq'></center></pre></bdo></b><th id='Ba7cq'></th></span></q></dt></tr></i><div id='Ba7cq'><tfoot id='Ba7cq'></tfoot><dl id='Ba7cq'><fieldset id='Ba7cq'></fieldset></dl></div>
    1. <tfoot id='Ba7cq'></tfoot>

        • <bdo id='Ba7cq'></bdo><ul id='Ba7cq'></ul>

        <legend id='Ba7cq'><style id='Ba7cq'><dir id='Ba7cq'><q id='Ba7cq'></q></dir></style></legend>

        使用 PHP 查找 SRV 记录

        SRV record lookup with PHP(使用 PHP 查找 SRV 记录)

          <small id='z14uL'></small><noframes id='z14uL'>

            <i id='z14uL'><tr id='z14uL'><dt id='z14uL'><q id='z14uL'><span id='z14uL'><b id='z14uL'><form id='z14uL'><ins id='z14uL'></ins><ul id='z14uL'></ul><sub id='z14uL'></sub></form><legend id='z14uL'></legend><bdo id='z14uL'><pre id='z14uL'><center id='z14uL'></center></pre></bdo></b><th id='z14uL'></th></span></q></dt></tr></i><div id='z14uL'><tfoot id='z14uL'></tfoot><dl id='z14uL'><fieldset id='z14uL'></fieldset></dl></div>
              <tfoot id='z14uL'></tfoot>
              • <bdo id='z14uL'></bdo><ul id='z14uL'></ul>
                    <tbody id='z14uL'></tbody>
                • <legend id='z14uL'><style id='z14uL'><dir id='z14uL'><q id='z14uL'></q></dir></style></legend>
                  本文介绍了使用 PHP 查找 SRV 记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果你输入

                  nslookup -type=SRV _xmpp-server._tcp.gmail.com
                  

                  (或在 OSX 中使用 dig 命令)你会得到一些与谷歌聊天相关的 SRV 记录

                  (or use the dig command in OSX) you get some SRV records relating to google chat

                  我想在 PHP 中复制这个功能,有没有人有什么好的想法如何做到这一点?

                  I would like to replicate this functionality in PHP, does anyone have any good ideas how to do this?

                  我想避免使用 exec(),因为这不会在 OSX/*NIX/WINDOWS 中返回 100% 的标准响应

                  I would like to avoid using exec() as this does not return 100% standard responses across OSX/*NIX/WINDOWS

                  谢谢!

                  推荐答案

                  你可以使用 Pear Net_DNS.我设法让它在 Linux 上运行,但还没有在 Windows 或任何其他平台上测试过:

                  You could use Pear Net_DNS. I managed to get this to work on Linux, but haven't tested it on Windows or any others:

                  require_once('Net/DNS.php');
                  $resolver = new Net_DNS_Resolver();
                  $response = $resolver->query('_xmpp-server._tcp.gmail.com', 'SRV');
                  if ($response) {
                      foreach ($response->answer as $rr) {
                          $rr->display();
                      }
                  }
                  

                  我修改了他们文档中的示例.希望这有帮助

                  I modified the example from their documentation. hope this helps

                  这篇关于使用 PHP 查找 SRV 记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                    <tbody id='VfHtf'></tbody>

                  <small id='VfHtf'></small><noframes id='VfHtf'>

                    <bdo id='VfHtf'></bdo><ul id='VfHtf'></ul>
                    1. <i id='VfHtf'><tr id='VfHtf'><dt id='VfHtf'><q id='VfHtf'><span id='VfHtf'><b id='VfHtf'><form id='VfHtf'><ins id='VfHtf'></ins><ul id='VfHtf'></ul><sub id='VfHtf'></sub></form><legend id='VfHtf'></legend><bdo id='VfHtf'><pre id='VfHtf'><center id='VfHtf'></center></pre></bdo></b><th id='VfHtf'></th></span></q></dt></tr></i><div id='VfHtf'><tfoot id='VfHtf'></tfoot><dl id='VfHtf'><fieldset id='VfHtf'></fieldset></dl></div>

                          <legend id='VfHtf'><style id='VfHtf'><dir id='VfHtf'><q id='VfHtf'></q></dir></style></legend>
                          <tfoot id='VfHtf'></tfoot>