views:

155

answers:

1

Hi All,

When authenticating to ldap using the following php code:

$ldap = ldap_connect("ldap.example.com")
if($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) {
  // log them in!
} else {
  // error message
}

Is there any way to sent the client IP address to the AD server rather than the server IP?

+1  A: 

No, because your server is what's actually making the connection to AD.

It's not a matter of "sending the IP address", the AD server is going to look at the actual connection and see what the remote address is (your PHP server, in this case).

David Gelhar
So can i do this with javascript?
Skeep