note 10755 added to gethostbyaddr
| From: | alfredo at almico dot com | Date: | Sat, 20 Jan 2001 12:42:25 +0000 |
| Subject: | note 10755 added to gethostbyaddr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9998@lists.php.net to get a copy of this message | ||
Well... I've seen that when an error occurs, the returned value is not the original IP, but the
IP with some extra garbage padding original string length up to 15 chars. My solution to avoid this
problem is the following:
$TheName=trim(gethostbyaddr($ip." "));
http://www.php.net/manual/en/function.gethostbyaddr.php