Re: dns_get_record() with timeout?
Raul Molnar <[email protected]> Mon, 13 Feb 2023 08:09:05 -0800 (PST)
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
Hi, See https://github.com/bluelibraries/dns This will help you to control your timeout (and more)/ On Friday, November 16, 2012 at 5:23:46 PM UTC+2, Salvatore wrote: > On 2012-11-16, Simon <[email protected]> wrote: > > Would anybody know of a fairly generic way of getting the IP addresses > > of a site, (ipv4 and ipv6 when available), while protecting myself from > > timeouts. > You have to write your own function that will build a UDP packet to > query a DNS server, call the socket_set_timeout() function to set a > timeout value, send the UDP packet, and hope that you get a response. > > An example of how you can do this is located at php.net: > > http://www.php.net/manual/en/function.gethostbyaddr.php#46869 > > -- > Blah blah bleh... > GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++