note 34598 added to function.gethostbyaddr
| From: | grimNOSPAMtraffic at hotNOSPAMmail dot com | Date: | Thu, 31 Jul 2003 19:31:35 +0000 |
| Subject: | note 34598 added to function.gethostbyaddr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-53102@lists.php.net to get a copy of this message | ||
If you have found the host of the ip, the shortest way to cut it not to display the full hostname to
the public would be:
$host = substr($host, strpos($host, ".") + 1);
P.S. strpos() can also be easily used if you want to put "*" for every simbol you ommit,
like so:
$os = strpos($host, ".");
$host = substr($host, $os);
$host = str_repeat("*", $os) . $host;
--McTrafik
----
Manual Page -- http://www.php.net/manual/en/function.gethostbyaddr.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34598
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34598&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34598&report=yes