getenv()

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

    getenv()

    Is there a variable to fetch with getenv that gives you the client host name.
    I can't find it in my docs so I suppose there isn't but it would be handy to be
    able to insert the "computer name" of the calling computer in some cases.
    (as my dev box is "Carnelian" . I would like to do something like:
    $clientdev = getenv('HOST_NA ME');

    /M.
    --
    Martin Skjöldebrand
    Family site: http://www.skjoldebrand.org
    "Art" site: http://martoni.deviantart.com
    Public key available at: http://wwwkeys.pgp.net
  • Ian.H

    #2
    Re: getenv()

    On Thu, 08 Apr 2004 04:29:02 +0000, Martoni wrote:
    [color=blue]
    > Is there a variable to fetch with getenv that gives you the client host
    > name. I can't find it in my docs so I suppose there isn't but it would
    > be handy to be able to insert the "computer name" of the calling
    > computer in some cases. (as my dev box is "Carnelian" . I would like to
    > do something like: $clientdev = getenv('HOST_NA ME');
    >
    > /M.[/color]


    $clientdev = $_SERVER['HTTP_HOST'];


    is the preferred "new" method.. but HTTP_HOST is what you're after =)



    Regards,

    Ian

    --
    Ian.H
    digiServ Network
    London, UK


    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: getenv()

      Martoni <karybdis@yahoo .com> wrote in message news:<873c7fm6s y.fsf@yahoo.com >...[color=blue]
      > Is there a variable to fetch with getenv that gives you the client host name.
      > I can't find it in my docs so I suppose there isn't but it would be handy to be
      > able to insert the "computer name" of the calling computer in some cases.
      > (as my dev box is "Carnelian" . I would like to do something like:
      > $clientdev = getenv('HOST_NA ME');[/color]

      Hostname is not available in env variables. But, this may work
      <http://in2.php.net/gethostbyaddr>

      --
      http://www.sendmetoindia.com - Send Me to India!
      Email: rrjanbiah-at-Y!com

      Comment

      Working...