I tried it and newr to that.
youcan get from the windows registry
I use the php_win32std.dll for exploring the registry
check on windows
start --> run --> type regedit
open HKEY_CURRENT_USER
open Volatile Environment
you will see the APPDATA contain the path of the user name
you can get from that.
here is the code I try
<?php
$strMainKey= 'Volatile Environment';
$mainKey= reg_open_key( HKEY_CURRENT_USER, $strMainKey );
if( !$mainKey ) err( "Can't open '$strMainKey' !" );
echo "'$strMainKey' Key opened\n\nKeys:\n<br>";
print_r( reg_enum_key($mainKey) );
for( $i= 0; $key= reg_enum_key($mainKey, $i); $i++ ) {
echo "\t$key\n <br>";
}
echo "\nValues:<br>\n";
print_r( reg_enum_value($mainKey) );
for( $i= 0; $value= reg_enum_value($mainKey, $i); $i++ ) {
echo "\t$value=".reg_get_value($mainKey, $value)."<br>\n";
}
reg_close_key($mainKey);
?>
Hope thats help
if someone can modify that code and get the clear user in variable let me know I have to use it too