Results 1 to 3 of 3

Thread: PHP: Remote address [resolved]

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    PHP: Remote address [resolved]

    How can I get the IP address of a user that views a PHP page? In JSP it's
    VB Code:
    1. <%= request.GetRemoteAddr() %>
    But how would I do it in PHP? What method?
    Last edited by filburt1; Feb 4th, 2002 at 04:47 PM.

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    It's stored in the REMOTE_ADDR CGI environmental variable, which PHP assigns to $REMOTE_ADDR, IIRC.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    You did RC, it works fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width