note 4408 modified in gethostbyaddr by ronabop

From: Date: Fri, 11 Aug 2000 16:23:16 +0000
Subject: note 4408 modified in gethostbyaddr by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1287@lists.php.net to get a copy of this message
To check a host's address: <pre> $r_hostname = gethostbyaddr($REMOTE_ADDR); if ($REMOTE_ADDR == "$r_hostname") { .... } </pre> This will fail if a lookup on the name returns the IP as the domain name (which can happen if you control a DNS server), but it's a pretty contrived example, and in any other case it will work. http://www.php.net/manual/function.gethostbyaddr.php

« previous php.notes (#1287) next »