Re: [PHP-PEAR] RFC on merge of PHPLib and Pear
[email protected] (Björn Schotte) Wed, 7 Mar 2001 17:52:24 +0100
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
* Chuck Hagenbuch wrote:
> Can you use phplib's auth to authenticate someone by ip address? What about by
class ipauth extends Auth {
.
.
.
function auth_validatelogin() {
$uid = false;
if ($GLOBALS["REMOTE_ADDR"] == "193.103.103.103") {
$uid = "sdfsdfsdsdfgfds";
}
return $uid;
}
}
Et voila:
<?php
page_open(array("sess" => "mysession", "auth" => "ipauth"));
print "You have User-ID: ".$auth->auth["uid"];
?>
> username and password but only if they're coming from a certain ip address? The
> list goes on and on... it's not generic.
It seems you have never used PHPLIB's Auth?
--
Björn Schotte [email protected]
http://rent-a-phpwizard.de/ [email protected]
Software dev advocate: http://www.advogato.org/person/baerli/