note 84593 added to features.http-auth

From: Date: Mon, 21 Jul 2008 05:38:33 +0000
Subject: note 84593 added to features.http-auth
Groups: php.notes 
Request: Send a blank email to php-notes+get-142409@lists.php.net to get a copy of this message
<?php /* * qq: 290359552 * return string : "error" or array("user","pass"); */ function auth() { if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); return "error"; } else { return array( $_SERVER['PHP_AUTH_USER'] , $_SERVER['PHP_AUTH_PW'] ); } } // test: $au= auth(); print_r( $au ); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 116.25.32.36 ---- Manual Page -- http://www.php.net/manual/en/features.http-auth.php Edit -- https://master.php.net/note/edit/84593 Del: integrated -- https://master.php.net/note/delete/84593/integrated Del: useless -- https://master.php.net/note/delete/84593/useless Del: bad code -- https://master.php.net/note/delete/84593/bad+code Del: spam -- https://master.php.net/note/delete/84593/spam Del: non-english -- https://master.php.net/note/delete/84593/non-english Del: in docs -- https://master.php.net/note/delete/84593/in+docs Del: other reasons-- https://master.php.net/note/delete/84593 Reject -- https://master.php.net/note/reject/84593 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#142409) next »