|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-25 09:00 UTC] lucas at facebook dot com
[2007-06-26 11:05 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 06:00:01 2025 UTC |
Description: ------------ Although you can use dns_get_record to get the contents of the TXT record you cannot use checkdnsrr or dns_check_record to see if the record exists. This could be useful for checking against a DNSBL Reproduce code: --------------- checkdnsrr('1.1.168.192.my.abusebl.net', "TXT"); Expected result: ---------------- E_WARNING: checkdnsrr(): Type 'TXT' not supported Actual result: -------------- 1 The following patch enables the TXT_TYPE: Index: dns.c =================================================================== RCS file: /repository/php-src/ext/standard/dns.c,v retrieving revision 1.70.2.7.2.4 diff -u -r1.70.2.7.2.4 dns.c --- dns.c 14 May 2007 11:33:34 -0000 1.70.2.7.2.4 +++ dns.c 25 Jun 2007 08:52:59 -0000 @@ -290,6 +290,7 @@ else if (!strcasecmp("ANY", Z_STRVAL_PP(arg2))) type = DNS_T_ANY; else if (!strcasecmp("SOA", Z_STRVAL_PP(arg2))) type = DNS_T_SOA; else if (!strcasecmp("CNAME", Z_STRVAL_PP(arg2))) type = DNS_T_CNAME; + else if (!strcasecmp("TXT", Z_STRVAL_PP(arg2))) type = DNS_T_TXT; else if (!strcasecmp("AAAA", Z_STRVAL_PP(arg2))) type = DNS_T_AAAA; else if (!strcasecmp("SRV", Z_STRVAL_PP(arg2))) type = DNS_T_SRV; else if (!strcasecmp("NAPTR", Z_STRVAL_PP(arg2))) type = DNS_T_NAPTR;