FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » dns_get_record() with timeout?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: dns_get_record() with timeout? [message #179658 is a reply to message #179657] Fri, 16 November 2012 15:23 Go to previous message
Salvatore is currently offline  Salvatore
Messages: 38
Registered: September 2012
Karma:
Member
On 2012-11-16, Simon <bad(at)example(dot)com> 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++
[Message index]
 
Read Message
Read Message
Previous Topic: keeping the page content stay in their positions and not merging
Next Topic: why can`t close mysql_connect?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 18 08:30:59 GMT 2024

Total time taken to generate the page: 0.04352 seconds