Yes... you definately want to wait to check the domains until later.
gethostbyaddr() (or any dns lookup) can be extremely slow...

Also, you're doing it *every* time even for the same visitor... if you
waited until you were parsing the log files you could do it *once* per
visitor (by caching the results of the first lookup).


On Tue, 19 Feb 2002, SED wrote:

> I'm using the gethostbyaddr() function in each webpage on my server to
> monitor the users. Today I noticed that it causes a very slow speed but
> before it was ok.
> Is it commonly bad choise to use it like I do?
> Should I rather check the host afterwards e.g. when I'm viewing the
> log-database?
> Regards,
> Sumarlidi Einar Dadason
> SED - Graphic Design
> ----------------------------------
> Tel.          4615501
> GSM           8960376
> E-mail        [EMAIL PROTECTED]
> Website:
> ----------------------------------
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to