WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Authenticator for Exchange Server LDAP
Categories : PHP, Authentication, LDAP, Security, Sessions Click here to Update Your Picture
David Perez
Date : Mar 17th 2004
Grade : 3 of 5 (graded 10 times)
Viewed : 18387
File : 3811.zip
Images : No Images for this code example.
Search : More code by David Perez
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

Hi, to use this simple authenticator you only need to do this:
1.- Configure your PHP to work with register_globals Off
2.- Create a folder in your root web with name secure
3.- modify the config.php file to yours needs
4.- On every page that you need security use this ..
include ("secure/lock.php") make any changue to the path as needed
5.- go to login pague and go in...

Your exchange server must have LDAP protocol running, the
main script is this..

<?php
include ("config.php");
session_start();
{
 
$strforIMAP = "{" . $authServer . ":143}";
 
//here we can chenge to other autentications methods
 
$mbox = @imap_open($strforIMAP, $_POST['login'], $_POST['password']);
  if (
$mbox=="") $UsuarioValido = false;
  else
$UsuarioValido = true;
  @
imap_close($mbox);
  if (
$UsuarioValido==true)
    {
     
$secreto= $_SERVER['REMOTE_ADDR'] . $_POST['login'] . session_id();
     
$_SESSION['login'] = $_POST['login'];
     
$_SESSION['secreto'] = $secreto;
      if (
$_POST['urlToGo']=="") $_POST['urlToGo'] = $DefaultInURL;
     
header ("Location: HTTP://" .$ServidorName . $_POST['urlToGo']);
      exit (
0);
     }
    elseif ((
$_POST['login']=="") || ($_POST['password']==""))
     {
     
header("Location: HTTP://$ServidorName/secure/login.php?error=A0003");
      exit (
0);
     }
    else
     {
     
header("Location: HTTP://$ServidorName/secure/login.php?error=A0002");
      exit (
0);
     }
   
$cnx->close();
  }
?>


i hope this can be usefull.
David Perez



Form Security - Match A Value For Success
Categories : PHP, Authentication, HTML and PHP, Sessions, Security
A simple PHP login script that you can modify to suite your needs. It use a session to store data in a session file submited by the page.
Categories : PHP, Sessions, Security, Authentication
Authentication script to authenticate users in Active Directory through LDAP.
Categories : LDAP, Authentication, Cookies, PHP
A damaged image generator (class) for validating text. CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
Categories : PHP, PHP Classes, Security, GD image library, Security
A login page that require username, password and userlevel.
Categories : PHP, Security, Sessions, MySQL, Databases
Use of bitmasks to represent permissions
Categories : PHP, Authentication, Bitwise Operators, Security, PHP Classes
Function to generate readable/remeberable random password
Categories : PHP, Security, Security
Password using php, Javascript, and html form
Categories : Security, PHP, Authentication, Java Script
Simple Password example
Categories : PHP, Authentication, Security, HTTP
MD5 secured login
Categories : PHP, Java Script, Authentication, Security
Password protection for Phorum 3.1.x with userlevels and log.
Categories : PHP, MySQL, Authentication, Security
session out Timer
Categories : PHP, Sessions, Security, Beginner Guides
PHP Function to Encrypt/Decrypt a string without a known key. The string itself has his own different key for every character.
Categories : PHP, Algorithms, Security, Authentication, Encryption
CAPTCHA[Image verification]
Categories : PHP, Security, GD image library, Graphics, Sessions
Session Validation Methods (Security Checks)
Categories : PHP, Sessions, Security
 Jose Santos wrote :1060
This is very useful to security in the Web.
I`ve develloped an security system based in database, and this use XML. 
It`s very secure and improve administration, audit, autentication and another proceeds for best security. I`m used php sessions.
But LDAP, is usualy the more useful !!