Jun25th

Connect to Active Directory LDAP with PHP

Ludovic Hindryckx Php, Tutorial Read on

Today we are going to see how to make an authentication with PHP and an Active Directory LDAP (AD).

What is LDAP ?

This code sample has been tested on a Windows 2k3 server.

First time, your server need the LDAP standard connection on the port 389, it’s activate for a default creation of the AD.

Your LAMP / WAMP server also need the php_ldap extension.

I’m using the PHP features to make a connection and the authentication.

First step, make the connection to the AD server :

$host = "my.server.host.com";
//Get authentication information by login form
$myLogin = $_POST["loginAD"];
$myPass = $_POST["passAD"];
$ressource = ldap_connect($host);

PHP will connect to server on the port 389, then you have to authenticate with an AD user to access to his information.

if($ressource){
try{
      //Authentication to the AD with a windows login, password
	$bind = ldap_bind($ressource, $myLogin."@".$host, $myPass);
 
         /**
         **To get all information, its necessary to be logged.
         **It exists an anonymous mode, if you want to test only the server connection
         **Now we can get all information about this user
         */
       //$dn contain information asked by Windows server to browse the correct AD tree.
       //Here I want to browse all Users in the LDAP AD
       $dn = "CN=Users,DC=my,DC=server, DC=host,DC=com";
       /*I search email, groups and the name of the user
         *We can have many information about a user,
         *you can see all of them with removing the last argument in the ldap_search
        */
       $result = ldap_search($ressource, $dn, "samaccountname=".$myLogin, array("mail", "memberof","name"));
       //ldap_get_entries will return an array of all asked information
        $info = ldap_get_entries($ressource, $result);
        echo "
<pre>".print_r($info, true);
}catch(Exception $e){
        echo $e->getMessage();
}

I get a result like this :

Array
(
    [count] => 1
    [0] => Array
        (
            [memberof] => Array
                (
                    [count] => 1
                    [0] => CN=Administrators,CN=Builtin,DC=my,DC=server,DC=host,DC=com
                )
 
            [0] => memberof
            [name] => Array
                (
                    [count] => 1
                    [0] => Userfirstname Userlastname
                )
 
            [1] => name
            [mail] => Array
                (
                    [count] => 1
                    [0] => user@host.com
                )
 
            [2] => mail
            [count] => 3
            [dn] => CN=Userfirstname Userlastname,CN=Users,DC=my,DC=server,DC=host,DC=com
        )
 
)
Jun2nd

Flash Builder 4 & Flash Catalyst Public Betas

Flash Builder 4 & Flash Catalyst demos are available in the Adobe Labs !!

Flash Builder 4

Flash Catalyst

May20th

Update Flash CS4 - 10.0.2

Nicolas Rajabaly AS3, Flash, Flash CS4, News Read on

Yeahhh :)

update and bug fixes : here

download it : here

May14th

Yogurt3D Flash Game Engine

Nicolas Rajabaly 3D, API, AS3, Flash, Flash CS4, News, Yogurt3D Read on

Yogurt3D is a flash based 3d engine which is based on OpenGL called SwiftGL and is stated as open source. The site mentions that OpenGL source can be converted to run in the engine.

Check the demo !

Check the official site !

Mar26th

What’s new on Make Me Pulse ?

Hi !
After our (soon) first year of life, it’s time to show a part of our differents works. As you know, Make Me Pulse makes only development (Flash and PHP). Here we go for a few selection of our work

Our biggest project was to work on the revamp of NRJ website platforms. We work with e-NRJ development team to made this possible. It was a huge work during 6 months and the result can be check on http://www.cheriefm.fr/

nrj

We also worked with Addiction Agency, some “old” friends from Publicis on several projects for Eurosport. We worked with them on another project for RM Gatte Fossé.

rmg

We have also work with Digitas on the new Nissan website. (FWA Site of the Day Baby :D)

nissan

We just finished the first part off the new Dior watches website (full Javascript with YUI… ouch ;) ) with The Blast Machine.

dior

And to finish this selection, a few words about our best meeting of 2008, Yohan and Olivier from Jam’s Brain. We work with them on Modepass.com (yes we are geek and we also like beauty and fashion !) and a new version will soon be launched.

modepass

To close, a few words about the future of Make Me Pulse. We have a new Senior PHP/Mysql Developper which comes at the beginning of May. To complete our team we are also hiring a talented Junior PHP/Javascript developper… so if you’are interested and near Paris (it’s better) feel free to contact us at contact_AT_makemepulse.com .

Nico & Antoine

Feb26th

Adobe Air 1.5.1 released

Nicolas Rajabaly AS3, Air, Flash, Flash CS4, News Read on

Adobe Air 1.5.1 is a relatively minor update that includes a number of bug fixes :

Mac & Windows :

Linux :

This release also contains one useful new feature : InvokeEvent.reason. For more infos, Oliver Goldman, a member of the AIR engineering team, posted a blog entry about it here.

Links :
- Adobe AIR 1.5.1 Developer and User Release Notes
- Adobe AIR 1.5.1 Documentation
- Download the Adobe AIR SDK
- Adobe AIR 1.5.1 Known Issues and Limitations
- Air team blog
- Oliver Goldman blog

Feb19th

YUI 2.7 new release

Antoine Ughetto Javascript, YUI team Read on

Yahoo announce a new release of the Yahoo User Interface today.

Version 2.7.0 introduces a new StyleSheet component, graduates three components out of “beta”, improves support for the upcoming release of IE8, includes over 180 bug fixes and enhancements, and ships with more than 300 functional examples.

More information on the YUI blog.
Just waiting for a new release of the YUI 3.X now !

Feb13th

Away3D 2.3 is out

Nicolas Rajabaly 3D, AS3, Flash, News, away3D Read on

away3D 2.3 demo 1

away3D 2.3 demo 2

away3D 2.3 demo 3

With awayBuilder :

awaybuilder

away3D 2.3 demo 3

And a custom parser for Maya scenes saved as Collada files.

Some other feature highlights in this release include:

* Interchangeable camera lenses to allow for different types of projection
* All values allowed for stage properties “align” and “scaleMode”
* Improved memory management
* Improved extrusion tools
* ROLL_OVER/ROLL_OUT events added to MouseEvent3D
* Billboard mesh objects for fast 2d sprites

To download check this page.

About

This is the R&D corner of Nicolas Rajabaly, Antoine Ughetto, Ludovic Hindryckx and Rémy Turpault from Make Me Pulse. We have some prestigious cowriters like Sean “Seantron” McCracken from Influxis…
Enjoy it.
Search By Make Me Pulse
Lab : Check it

You want to be a contributor?!
Send a mail to :
antoine _AT_ makemepulse _DOT_ com




About

This is the R&D corner of Nicolas Rajabaly, Antoine Ughetto, Ludovic Hindryckx and Rémy Turpault from Make Me Pulse. We have some prestigious cowriters like Sean “Seantron” McCracken from Influxis…
Enjoy it.
Search By Make Me Pulse
Lab : Check it

You want to be a contributor?!
Send a mail to :
antoine _AT_ makemepulse _DOT_ com

Categories