Jump to content

get computername


vbnullchar

Recommended Posts

Do you mean this?

function get_ip()
{
    if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
    else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
    else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
    else $ip = "0.0.0.0"; //Unknown
    return $ip;
}

Link to comment
https://forums.phpfreaks.com/topic/67987-get-computername/#findComment-341868
Share on other sites

Do you mean this?

function get_ip()
{
    if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
    else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
    else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
    else $ip = "0.0.0.0"; //Unknown
    return $ip;
}

 

it returns the ip address of the proxy server not the client

Link to comment
https://forums.phpfreaks.com/topic/67987-get-computername/#findComment-341881
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.