Re.: Implementation differences between checkdnsrr and dns_get_record

[email protected] (Jānis Elmeris)
Newsgroups php.general
Message-ID <HE1PR01MB3913022ECFCB231EEEF8707FEC869@HE1PR01MB3913.eurprd01.prod.exchangelabs.com>
I cannot answer the question competently, but just so it doesn't remain completely unanswered. :)

If you are interested in the implementation of both functions, here is the code for "dns_check_record" ("checkdnsrr" is an alias for this one):
https://github.com/php/php-src/blob/master/ext/standard/dns.c#L382

And here is the code for "dns_get_record":
https://github.com/php/php-src/blob/master/ext/standard/dns.c#L823

At a first glance, they both use functions "dns_open", "php_dns_search", "php_dns_free_handle", so a difference in the network libraries should not have been the issue.

Although, you should look at the code for the specific PHP version you were using at the time.

Also, there is different code for Windows implementation:
https://github.com/php/php-src/blob/master/ext/standard/dns_win32.c

Regards,
Janis

________________________________
No: Daniele B <[email protected]>
Nosūtīts: pirmdiena, 2021. gada 25. oktobris 16:01
Kam: Jānis Elmeris <[email protected]>; [email protected] <[email protected]>
Tēma: RE: Atb.: Implementation differences between checkdnsrr and dns_get_record

Absolutely and thanks for the chance.

In this case for implementation I mean if they both rely on the same network libraries and methods to access the network.

To be more detailed, recently I dealt - by others PHP code -  with both these instructions troubleshooting a wrong network problem, between a firewall configuration and the regional availability of the servers of origin/destination. The developers of this 3rd company asked me to install some code that they were using in one and the other instruction with different final results. Actually, I do not remeber much more and which of the two functions got most useful.

I see also that there are some difference in the PHP versions supported by them, that make me think one time more they have different kind of network access.

Daniele Bonini
[par7133]



-------- Original message --------
From: Jānis Elmeris <[email protected]>
Date: 10/25/21 11:31 (GMT+01:00)
To: [email protected], Daniele B <[email protected]>
Subject: Atb.: Implementation differences between checkdnsrr and dns_get_record

Please, be more precise.

The obvious differences are in the different function signatures.

Regards,
Janis

________________________________
No: Daniele B via php-general <[email protected]>
Nosūtīts: sestdiena, 2021. gada 23. oktobris 04:43
Kam: [email protected] <[email protected]>
Tēma: Implementation differences between checkdnsrr and dns_get_record

Hello everyone,

I would like to fill in my curiosity.. What are exactly the implementation differences between checkdnsrr() and dns_get_record() instructions?

Thx a lot,

Daniele Bonini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.