http user in php script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aznFETISH

    http user in php script

    I once saw a code to show the username that logged in in a php script after
    logging in with http authentificatio n, I cant seem to find the code anywhere


  • Jacob Atzen

    #2
    Re: http user in php script

    On 2005-04-09, aznFETISH <news@aznfetish .com> wrote:[color=blue]
    > I once saw a code to show the username that logged in in a php script
    > after logging in with http authentificatio n, I cant seem to find the
    > code anywhere[/color]

    Are you looking for this:

    <http://dk.php.net/manual/en/reserved.variab les.php#reserve d.variables.ser ver>

    Check 'PHP_AUTH_USER' .

    --
    Cheers
    - Jacob Atzen

    Comment

    • aznFETISH

      #3
      Re: http user in php script

      I try this
      <?PHP
      $username=$_SER VER['PHP_AUTH_USER'];
      echo "$username" ;
      ?>
      but it shows nothing

      "aznFETISH" <news@aznfetish .com> wrote in message
      news:z5U5e.3700 4$Pc.25728@torn ado.tampabay.rr .com...[color=blue]
      >I once saw a code to show the username that logged in in a php script after
      >logging in with http authentificatio n, I cant seem to find the code
      >anywhere
      >[/color]


      Comment

      • Jacob Atzen

        #4
        Re: http user in php script

        On 2005-04-09, aznFETISH <news@aznfetish .com> wrote:[color=blue]
        > I try this
        ><?PHP
        > $username=$_SER VER['PHP_AUTH_USER'];
        > echo "$username" ;
        > ?>
        > but it shows nothing[/color]

        Weird, it works fine here. Try var_dump($_SERV ER) and see what you can
        find.

        --
        Cheers
        - Jacob Atzen

        Comment

        • aznFETISH

          #5
          Re: http user in php script

          ok thanks, it shows that should use
          $_SERVER['REMOTE_USER'];


          "Jacob Atzen" <jacob@aub.dk > wrote in message
          news:slrnd5gjcl .30kh.jacob@tan k.aub.dk...[color=blue]
          > On 2005-04-09, aznFETISH <news@aznfetish .com> wrote:[color=green]
          >> I try this
          >><?PHP
          >> $username=$_SER VER['PHP_AUTH_USER'];
          >> echo "$username" ;
          >> ?>
          >> but it shows nothing[/color]
          >
          > Weird, it works fine here. Try var_dump($_SERV ER) and see what you can
          > find.
          >
          > --
          > Cheers
          > - Jacob Atzen[/color]


          Comment

          Working...