Bug #13423 Updated: gethostbyname() returns hostname when ip address is part of hostname

From: Date: Sat, 15 Jun 2002 13:24:36 +0000
Subject: Bug #13423 Updated: gethostbyname() returns hostname when ip address is part of hostname
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10496@lists.php.net to get a copy of this message
ID: 13423 Updated by: derick@php.net Reported By: gardner@armory.com -Status: Analyzed +Status: Closed Bug Type: Unknown/Other Function PHP Version: 4.0.4pl1 New Comment: It might be silly behavior... but we can not change this now due to BC issues. Derick Previous Comments: ------------------------------------------------------------------------ [2001-09-24 18:34:44] jimw@php.net actually, what is going on is that php's gethostbyname() simply returns the name when it can't be resolved. (that seems like rather silly behavior to me, and is probably worth changing.) ------------------------------------------------------------------------ [2001-09-24 18:12:03] gardner@armory.com When you pass a host name such as ip-255-255-255-255.reverse.mobilenetics.com to gethostbyname() it returns the hostname, not the ip address. Regular hostnames like google.com work. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13423&edit=1

« previous php.bugs (#10496) next »