problem with server ip address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swethak
    New Member
    • May 2008
    • 118

    problem with server ip address

    hi,

    i used this function . i got http protocal address
    [code=php]echo $_SERVER['REMOTE_ADDR']; [/code]
    i used this function . i got the DNS server ip address.
    [code=php]
    $domain = GetHostByName($ REMOTE_ADDR);
    echo $domain;
    [/code]
    But i want the server ip address like 219.91.199.136. how write the php function .plz tell that.
    Last edited by Atli; Jun 2 '08, 05:40 PM. Reason: Added [code] tags.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Try the $_SERVER['SERVER_ADDR'] element.

    P.S.
    Please post your questions in a format that people can actually understand.
    Spaces, line-breaks, and [code] tags are your friends! :)
    Thanks.

    Comment

    Working...