note 17308 deleted from language.variables.predefined by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 19:28:05 +0000 |
| Subject: | note 17308 deleted from language.variables.predefined by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22665@lists.php.net to get a copy of this message | ||
Greetings!
Sometimes $HTTP_HOST will return the port as well.
Example: someserver.com:1034
If you want access to a page to be restricted to local access use this:
list ($host, $trash) = split(":",$HTTP_HOST, 2);
if(!stristr($HTTP_REFERER, "$host")) {
$message = "Foreigner!"; }
else {
$message = "Local!"; }
echo $message;