Thread: Logging IP addresses

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    3

    Logging IP addresses

    OK, I am trying to write a CGI script that records the IP address of the people that run it. I am doing this under SunOS 5.8. I have tried using cgicc, but I have a 9 MB quota and it comes out to about 25 MB compiled. Is there functionality built into some library of g++ to log the ip?

  2. #2
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    wouldn't this go under GD scince its CGI?

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    no, you can write CGI scripts in C++

  4. #4
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225
    25 MB??? I always thought it would only amount to less than 200 kB Even my C++ TCP/IP client program hasn't reached over 100 kB. You should use Perl scripts instead -- it would be a lot smaller
    All men are created equal. But some are more equal than others.

    Visit me at http://www.angelfire.com/my/billholm

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    3
    That was just teh size of the compiled library, but nevermind. Someone was kind enough to point out that the address of the client is stored in the env. variable REMOTE_ADDR, so no need for the library I was try to use in this instance.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IP logging
    By cruxis in forum Networking/Device Communication
    Replies: 5
    Last Post: 10-05-2004, 04:31 AM
  2. Replies: 1
    Last Post: 09-11-2004, 08:52 AM
  3. resolving names and ip addresses
    By dicky in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-01-2004, 03:32 PM
  4. increment IP addresses - newbie Q.
    By webwesen in forum C Programming
    Replies: 6
    Last Post: 09-09-2003, 08:25 AM