On 6 Mar 2005 15:46:05 -0800, "yawnmoth" <te*******@yahoo.com> wrote:
using the gethostbyname function seems to noticeably slow down pages.
some of the comments in php.net's gethostbyname entry suggest using a
version that caches the result, but those versions also only speedup
subsequent calls to gethostbyname - the first call is still as slow as
ever.
so is there anything i can do to speed this up?
Are lookups slow from the commandline using 'host' or 'nslookup'? How slow is
slow? It's unavoidable that it'll take some time.
perhapes i can just
implement a function equivalent to gethostbyname using fsockopen, or
something?
Reinventing the wheel is probably the very last thing you want to consider -
name resolution involves communicating with other servers, so if it's just that
communication that's slow then reinventing DNS resolution code isn't going to
help.
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool