Re: Re: PHP 4.0 Bug #8884 Updated: gethostbyaddr returns a 15 chars string IP when an error occurs

From: Date: Thu, 25 Jan 2001 01:01:41 +0000
Subject: Re: Re: PHP 4.0 Bug #8884 Updated: gethostbyaddr returns a 15 chars string IP when an error occurs
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44943@lists.php.net to get a copy of this message
On Thu, 25 Jan 2001 milani@mclink.it wrote: >$TheName=trim(gethostbyaddr($row->THEHOST." ")); > >The original line: > >$TheName=trim(gethostbyaddr($row->THEHOST)); > >called using an unresolvable IP like xx.xx.x.xxx returned something like >xx.xx.x.xxxMKJA, where MKJA represents some garbage I discovered was used to >fill up to 15 chars (the maximum length for an IP). > >I guess an IP like 212.59.60.57 should do the job :-) Nope, works for me just fine. No garbage in the end. This is with the latest CVS. Please try the snapshot from http://snaps.php.net/ --Jani

« previous php.dev (#44943) next »