|
Posted by Dr. No on 03/06/07 02:16
shror wrote:
> hi,
>
> i want to get the visitors some information like:
> ip
> host provider
> windows username
> browser
> OS
> Language
> NS lookup
>
> i only know the ip and hostprovider which is:
> ip : $ip = getenv("REMOTE_ADDR");
> host provider : $host = gethostbyaddr($ip);
>
> so please if the other variables could be grabbed please help me
> thanks in advance for your help
>
> shror
>
Most of this should be accessible via environment variables, such as the
$_SERVER array. Try:
$_SERVER['REMOTE_HOST']
You don't need some complicated analytics package to grab this basic
information. Look here:
http://www.php.net/reserved.variables
I'm curious as to your request about the windows username. Are you trying to do
this on an intranet and verifying against an LDAP server? If so, there is a way
to do this. Look into Mod_LDAP. I think that allows you to access the nt
username via $_SERVER['AUTHENTICATE_SAMACCOUNTNAME']. I've done it before,
though I'm fuzzy on the details. It was a couple of years ago.
Navigation:
[Reply to this message]
|