Web Analytics Made Easy -
StatCounter Passing the computer name via an email form - CodingForum

Announcement

Collapse
No announcement yet.

Passing the computer name via an email form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing the computer name via an email form

    Here's the code I have thus far:

    PHP Code:
    if (getenv(HTTP_CLIENT_IP)){ 
    $user_ip=getenv(HTTP_CLIENT_IP); 

    else { 
    $user_ip=getenv(REMOTE_ADDR); 
    }

    $mailbody.="\n\nSenders Browser:\n\n$HTTP_USER_AGENT\n................................";
    $mailbody.="\n\nSenders IP Address:\n\n$user_ip\n................................"
    This form is deployed internally thus it is behind a proxy. The user ip address, subsequently, is coming through the same from each machine because of the way the network is set up. Are there other variables I can use to possibly retrieve the computer name or any other data that would tell me which computer was used to submit the form?

    Ash

  • #2
    Not sure if this helps:


    Edit: I used this to show all values of the $ENV hash:

    foreach (keys %ENV) {
    print "$_ = $ENV{$_}<br />";
    }

    -Stu
    if ($ENV{'QUERY_STRING'} eq "Afrow UK") {
    print "$ENV{'QUERY_STRING'} rocks!";
    } else {
    print qq~$ENV{'QUERY_STRING'} sucks :)~;
    }

    Comment

    Working...
    X