20:31 pHp Şifreleme | |
<?php
$kul[0]['username']="admin";
$kul[0]['password']="Turkworm"; // Dogrulama function authenticate()
{ header( 'WWW-Authenticate: Basic realm="Private"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { authenticate(); } else
{ for($i=0;$i<count($kul);$i++){ if($_SERVER['PHP_AUTH_USER']==$kul[$i]['username'] &&$_SERVER['PHP_AUTH_PW']==$kul[$i]['password']){$auth=TRUE;}} if($auth !=TRUE) {authenticate();} | |
|
Всего комментариев: 0 | |