Welcome Guest, Not a member yet? Register   Sign In
creating safer login
#1

[eluser]Prasad.P[/eluser]
Hi Everybody,

I have implemented http authentication method of login form without CI, and also with CI. The CI Function is as follows:

function check()
{
$this->load->helper(array('url','form'));
$this->load->model('Loginmodel');
if ((isset($_SERVER['PHP_AUTH_USER'])) && (isset($_SERVER['PHP_AUTH_PW'])))
{
if ($this->Loginmodel->verify_login($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']))
{
redirect('/login/logged');
}
else
{
redirect('/main/index');
}
}
else
{
header('WWW-Authenticate: Basic realm=""');
header('HTTP/1.0 401 Unauthorized');
echo 'Please close the Browser and open the website in a new window';
exit;
}
}

Can anybody suggest me any other safer method like http authentication.


Messages In This Thread
creating safer login - by El Forum - 05-22-2008, 06:55 AM
creating safer login - by El Forum - 05-22-2008, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB