note 55932 added to function.gethostbyname
| From: | tabascopete78atyahoodotcom at osu1 dot php dot net | Date: | Thu, 18 Aug 2005 07:29:02 +0000 |
| Subject: | note 55932 added to function.gethostbyname | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93824@lists.php.net to get a copy of this message | ||
I was using file_get_contents on a set of URLs. Some of them URLs were invalid (the structure of it
was ok but the DNS hosts couldn't resolve them) and I kept getting an annoying warning. I
wanted to check the DNS somehow but existing check dns function in php doesn't have one for
windows and the one a person supplied there does not work 100% of the time.
Instead use this function to try to resolve a host. This won't throw any warnings, you just
need to check the output. You'll get the same warnings with fopen and fsockopen.
----
Manual Page -- http://www.php.net/manual/en/function.gethostbyname.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55932
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55932&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55932&report=yes
Search -- http://master.php.net/manage/user-notes.php