Skip to content

Instantly share code, notes, and snippets.

@vijayjt
vijayjt / azure-web-app-php-ldap-test.php
Created April 10, 2017 19:47
Code for testing LDAP connection from an Azure Web App in an ASE to a AD DC in a VNet
<?php
$domain = 'acme.local';
$username = 'aduser';
$password = 'replaceWithPassword';
$ldapconfig['host'] = '192.168.21';
$ldapconfig['port'] = 389;
$ldapconfig['basedn'] = 'dc=acme,dc=local';
$ldap_dn = "DC=acme,DC=local";