472,127 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

PHP Signon/Signup solution needed

I've looked at and installed PatUser
http://www.php-tools.net/site.php?&f...r/overview.xml and
PHPautomembersarea http://www.dwalker.co.uk/phpautomembersarea/ but
neither of those systems seem to do what I want, which is: some PHP
pages need to run for anybody on the web and also for signed on users
that get additional content, I also want to protect
folders/directories, interface with Paypal, and have lost password dialogs.

I've recently looked at Guard Dog http://www.phpguarddog.com/, but
before I spend US $75 for it I'm wondering if anyone can give some
feedback on Guard Dog, or can suggest a free or commercial PHP/MySql
signon system solution they are successfully using or have deployed at a
client site.

Thank You
Oct 15 '05 #1
2 1762
Take a look at Pear's Authentication

http://pear.php.net/manual/en/packag...entication.php

<?php

// In this test, the file is named "test.php".

require_once "Auth.php";

function loginFunction()
{
/*
* Change the HTML output so that it fits to your
* application.
*/
echo "<form method=\"post\" action=\"test.php?login=1\">";
echo "<input type=\"text\" name=\"username\">";
echo "<input type=\"password\" name=\"password\">";
echo "<input type=\"submit\">";
echo "</form>";
}

if (isset($_GET['login']) && $_GET['login'] == 1) {
$optional = true;
} else {
$optional = false;
}

$dsn = "mysql://user:password@localhost/database";
$a = new Auth("DB", $dsn, "loginFunction", $optional);

$a->start();

echo "Everybody can see this text!<br />";

if (!isset($_GET['login'])) {
echo "<a href=\"test.php?login=1\">Click here to log in</a>\n";
}

if ($a->getAuth()) {
echo "One can only see this if he is logged in!";
}
?>

Oct 16 '05 #2
On or about 10/16/2005 10:05 AM, it came to pass that Meiao wrote:
Take a look at Pear's Authentication

http://pear.php.net/manual/en/packag...entication.php

<snip>
Thank you!
Oct 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by David | last post: by
1 post views Thread by Pony Tsui | last post: by
4 posts views Thread by cj | last post: by
3 posts views Thread by Dustin | last post: by
reply views Thread by jon | last post: by
2 posts views Thread by fredtbx | last post: by
2 posts views Thread by nazgul42 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.