I'm porting FrontEndUsers over to use our Active Directory server rather than the database, and I need a value for User ID.
I've found an ideal candidate: msexchmailboxguid, which is indeed unique for each user. However I've hit a problem: this attribute is a series of 16 hex bytes. PHP seems to insist on interpreting this value as a 16-character string, (which come out looking like this: )¦§ð”MûE³rèm.), and without an asc() function I don't see how I can decompose this and turn it back into a number. Anyone got any suggestions?
Thanks in advance, Andy
PHP help: how do I express a series of binary values as a number?
Re: PHP help: how do I express a series of binary values as a number?
Yes, I get 0, since it still treats it as a string.
I did eventually find the solution:
bin2hex gets me a hex string, which I can then pass to base_convert to get me an (absolutely huge) decimal number. I'm really glad that php no longer restricts itself to the advertised 32 bits maximim size. Though lord alone knows why M$ think they need quite such a huge identifier - so that every atom on the planet can have its own email address?