Hello World, I've written an extensive Discussion Group CGI in Perl for our web site and it’s been working great for over six months. I've wanted to expand my reporting on our users so I thought it would be good to record their IP address and Browser type when they log in. The Browser type is recording perfectly, but for some reason everyone seems to have the same IP address and I know that can’t be true. While I won’t print the entire Log-In Perl Code here, I will just included the sections that pertain to the recording of the IP and Browser info…
#!/usr/local/bin/perl -- use CGI::Carp qw(fatalsToBrowser); $|=1; $RMIP=$ENV{'REMOTE_ADDR'}; $RUAG=$ENV{'HTTP_USER_AGENT'}; -----(later on in the code)----- # RECORD USERS IP ADDRESSES open (USERIP, ">>/usr/local/www/htdocs/classicappliances/NEW DISCU +SS/PROFILES/USER-IP-FILE.txt"); flock (USERIP, 2); print USERIP "$NAME_CHOICE--REMOTE ADDR-$RMIP---user agent-$RUAG\n +"; close (USERIP); flock (USERIP, 8);
Here is a sample of the results that we’re recorded in my USER-IP-FILE.txt file…
Unimatic1140--REMOTE ADDR-216.23.15.143---remote host----user agent-Mo +zilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90) spambdamn--REMOTE ADDR-216.23.15.143---remote host----user agent-Mozil +la/4.75 [en] (Windows NT 5.0; U) jasonl--REMOTE ADDR-216.23.15.143---remote host----user agent-Mozilla/ +4.0 (compatible; MSIE 5.0; Windows 98; DigExt) earthling177--REMOTE ADDR-216.23.15.143---remote host----user agent-Mo +zilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) angus--REMOTE ADDR-216.23.15.143---remote host----user agent-Mozilla/4 +.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MSN 6.1; MSNbMSFT; + MSNmen-us; MSNc11) whirlpoolbklyn--REMOTE ADDR-216.23.15.143---remote host----user agent- +Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 95) trainguy--REMOTE ADDR-216.23.15.143---remote host----user agent-Mozill +a/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98; Win 9x 4.90)
See, all the IP address are the same? I thought the $ENV{'REMOTE_ADDR'} command picks up the each users individual IP address? Does anyone see what I’m doing wrong??? Any advice will be greatly appreciated.

In reply to IP Address of Person Submitting Log-In Request by Unimatic1140

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.