Re: When should I use gethostbyaddr () if I want to monitoring the users

From: Date: Tue, 19 Feb 2002 20:14:44 +0000
Subject: Re: When should I use gethostbyaddr () if I want to monitoring the users
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85429@lists.php.net to get a copy of this message
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). -p 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 sed@sed.is > Website: www.sed.is > ---------------------------------- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#85429) next »