function "gethostbyname" - how can i deactivate cache / force look-up???
| From: | Tobes | Date: | Wed, 12 May 2004 16:15:27 +0000 |
| Subject: | function "gethostbyname" - how can i deactivate cache / force look-up??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186011@lists.php.net to get a copy of this message | ||
Hi there -
in a script I use the function "gethostbyname" to resolve a hostname
(www.example.com) into an IP-address.
Unfortunately, the host name that I try to resolve changes its IP address
frequently.
Since the function "gethostbyname" caches its results, it sooner or later
returns a wrong IP-address.
How can I deactivate cache for this function (or force the look-up) or what
other function could I use to get the IP-address?
Thanks a lot for your help in advance!!!
Tobes =)