I received some documentation on how to read from my companies HTTP header for ASP and Java but I'm looking to read this in with PHP. Here's the examples they gave me, can someone direct me on how I can accomplish this?

ASP
For the User ID_: strUserID=Request.ServerVariables(“HTTP_IV_User”)

JAVA
For the User ID_: strUserID=request.getHeader(“iv-user”);

    You could try using [man]apache_request_headers/man to get an array of headers sent with the current request.

    EDIT: Also note that if "HTTP_IV_User" is actually being set as an environment variable, you might be able to access it via the $SERVER array as well. Try doing a [man]print_r/man on the $SERVER array to see its contents and look for 'HTTP_IV_User' or something similar.

      Found it when doing a print_r($_SERVER) like you said. It comes up as [HTTP_IV_USER]. Now what do I do with it?? How do I store it in a variable?

        Got it, this is great thanks!

        $VarUser = $_SERVER['HTTP_IV_USER'];

        I'm planning on keeping a running table going of users that access the pages that I put out there along with the page that they accessed and what time they accessed it. Can you think of any other information I should/can grab?

          Write a Reply...