Re: [PHP] what is my dns ip address

2007-09-03 Thread Olav Mørkrid
yeah but i assume this assumes you are on a unix machine and have administrator rights. it would be nice to be able to look up ip addresses swiftly and automatically on any machine and any operating system running php. On 03/09/07, Per Jessen <[EMAIL PROTECTED]> wrote: > Olav Mørkrid wrote: > > >

Re: [PHP] what is my dns ip address

2007-09-03 Thread Per Jessen
Olav Mørkrid wrote: > the source of the problem is gethostbyaddr(). it seems to have a 4,5 > second timeout, so some lookups time out after 4,5 seconds, while most > of them are resolved in < 0.1 second; a radically performance > difference. You can change the timeout be amending the options stat

Re: [PHP] what is my dns ip address

2007-09-02 Thread Olav Mørkrid
the source of the problem is gethostbyaddr(). it seems to have a 4,5 second timeout, so some lookups time out after 4,5 seconds, while most of them are resolved in < 0.1 second; a radically performance difference. the user written gethostbyaddr_timeout() on the gethostbyaddr man page overcomes thi

Re: [PHP] what is my dns ip address

2007-09-02 Thread Richard Heyes
Stut wrote: Richard Heyes wrote: Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver?

Re: [PHP] what is my dns ip address

2007-09-02 Thread Stut
Richard Heyes wrote: Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver? What? If DNS

Re: [PHP] what is my dns ip address

2007-09-02 Thread Richard Heyes
Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. The DNS resolver? What? If DNS servers are assigned

Re: [PHP] what is my dns ip address

2007-09-02 Thread Per Jessen
Richard Heyes wrote: >> Or read the contents of /etc/resolv.conf > > Faster for static DNS servers, but if you're using DHCP assigned > servers, they aren't likely to be in there. > Yes they are. The DNS resolver has just one place to look, and that's /etc/resolv.conf. /Per Jessen, Zürich

Re: [PHP] [EMAIL PROTECTED]: Re: [PHP] what is my dns ip address]

2007-09-01 Thread Richard Heyes
Robert Degen wrote: Or read the contents of /etc/resolv.conf I'm not familiar with, but does any MS product have any comparable file? There is a hosts file, but no resolv.conf or equivalent AFAIK. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and

[PHP] [EMAIL PROTECTED]: Re: [PHP] what is my dns ip address]

2007-09-01 Thread Robert Degen
>> Or read the contents of /etc/resolv.conf I'm not familiar with, but does any MS product have any comparable file? I remember a "host(s)" ... file somewhere below system32\etc\... but is there any resolv.conf ? I got no win machine here with me, so I can't look it up :-) > Faster for static

Re: [PHP] what is my dns ip address

2007-09-01 Thread Richard Heyes
Or read the contents of /etc/resolv.conf Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online

Re: [PHP] what is my dns ip address

2007-09-01 Thread Per Jessen
Richard Heyes wrote: > Olav Mørkrid wrote: >> is there a function in php that will return the ip address of the dns >> server on the system? >> >> eg. >> >> $dns_ip = get_dns_ip_address(); > > > Don't know of a specific command that returns them, but you could > parse the output of nslookup an

Re: [PHP] what is my dns ip address

2007-09-01 Thread Richard Heyes
Olav Mørkrid wrote: is there a function in php that will return the ip address of the dns server on the system? eg. $dns_ip = get_dns_ip_address(); Don't know of a specific command that returns them, but you could parse the output of nslookup and cache the results. -- Richard Heyes +44 (0

[PHP] what is my dns ip address

2007-09-01 Thread Olav Mørkrid
is there a function in php that will return the ip address of the dns server on the system? eg. $dns_ip = get_dns_ip_address(); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php