note 112480 added to reserved.variables.server
| From: | programings at abv dot bg | Date: | Thu, 20 Jun 2013 18:23:04 +0000 |
| Subject: | note 112480 added to reserved.variables.server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195303@lists.php.net to get a copy of this message | ||
I found a very simple and crafty way to protect some information in your web page using protection
by header with $_SERVER['HTTP_USER_AGENT'].
<?php
$password = "dog";
if($_SERVER['HTTP_USER_AGENT']==$password) {
echo "Access Granted";
} else {
echo "Some default info";
}
?>
Now you can change your User-Agent header with LiveHTTPHeader (addon for Mozilla Firefox that
capture HTTP headers) for example, and the secret info will be shown in the page.
----
Server IP: 69.147.83.199
Probable Submitter: 87.246.49.250
----
Manual Page -- http://php.net/manual/en/reserved.variables.server.php
Edit -- https://master.php.net/note/edit/112480
Del: integrated -- https://master.php.net/note/delete/112480/integrated
Del: useless -- https://master.php.net/note/delete/112480/useless
Del: bad code -- https://master.php.net/note/delete/112480/bad+code
Del: spam -- https://master.php.net/note/delete/112480/spam
Del: non-english -- https://master.php.net/note/delete/112480/non-english
Del: in docs -- https://master.php.net/note/delete/112480/in+docs
Del: other reasons-- https://master.php.net/note/delete/112480
Reject -- https://master.php.net/note/reject/112480
Search -- https://master.php.net/manage/user-notes.php