Nomad
|
| Posted: 08/12/2002, 12:30 AM |
|
Hi there,
I have a project which was initially written in CCS - ASP with templates which I would like to convert into PHP format. In the ASP project I set a couple of session variables as follows:
' Grab User machine IP Address for Session Variable
Session("IPAddress") = Request.ServerVariables("REMOTE_ADDR")
' Grab User Login sign-on for Session Variable
Session("LoginID") = ucase(mid(Request.ServerVariables("REMOTE_USER"),11,8))
I know that the first example will convert using the either
$_SERVER['REMOTE_ADDR']
or
$HTTP_SERVER_VARS['REMOTE_ADDR']
Can anyone tell me how I can convert the ("REMOTE_USER") example. This is my first venture into the world of PHP.
Hoping someone can help.
|
|
|
 |
Ron
|
| Posted: 08/13/2002, 5:09 AM |
|
Hello,
to get the list of all the environment variables (and a lot of other information) use phpinfo() function.
|
|
|
 |
Nomad
|
| Posted: 08/16/2002, 5:28 AM |
|
Cheers for that Ron,
I have already tried using 'phpinfo' but see no reference to the "REMOTE_USER".
I am running PHP on an IIS4 server.
In the natural order of things I would have assumed the correct code would have been something like:
$_SERVER['REMOTE_USER']
or
$HTTP_SERVER_VARS['REMOTE_USER']
but it looks as though you cannot assume anything with IIS.
|
|
|
 |
|