note 108925 deleted from function.php-sapi-name by peehaa
| From: | peehaa@php.net | Date: | Wed, 24 Jul 2013 19:47:43 +0000 |
| Subject: | note 108925 deleted from function.php-sapi-name by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-195758@lists.php.net to get a copy of this message | ||
Note Submitter: sageptr at gmail dot com
----
Just another simple way to determine if script ran locally (php cli or wget), or by remote user:
<?php
if(isset($_SERVER["REMOTE_ADDR"]) && ($_SERVER["REMOTE_ADDR"] !=
$_SERVER["SERVER_ADDR"])){
exit('Permission denied');
};
// do something
?>