note 123563 added to function.gethostbyaddr
| From: | Vincent@php.net | Date: | Tue, 29 Jan 2019 19:11:29 +0000 |
| Subject: | note 123563 added to function.gethostbyaddr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-210138@lists.php.net to get a copy of this message | ||
I discovered that gethostbyaddr sometimes returned the same host name with some uppercase letters in
it and sometimes with all lowercase letters.
example:
d54c34fa1.access.example.com
d54C34FA1.access.example.com
This is probably not the fault of gethostbyaddr, but this can be a problem when comparing or
storing, because it will give two entries instead of one.
A simple solution to this is to use strtolower on the host name.
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.142 (proxied: 84.87.109.171)
----
Manual Page -- http://php.net/manual/en/function.gethostbyaddr.php
Edit -- https://master.php.net/note/edit/123563
Del: integrated -- https://master.php.net/note/delete/123563/integrated
Del: useless -- https://master.php.net/note/delete/123563/useless
Del: bad code -- https://master.php.net/note/delete/123563/bad+code
Del: spam -- https://master.php.net/note/delete/123563/spam
Del: non-english -- https://master.php.net/note/delete/123563/non-english
Del: in docs -- https://master.php.net/note/delete/123563/in+docs
Del: other reasons-- https://master.php.net/note/delete/123563
Reject -- https://master.php.net/note/reject/123563
Search -- https://master.php.net/manage/user-notes.php