SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Log Ip Address'es
-
Nov 1, 2000, 10:58 #1
I've made a form that logs certain information to a log file called log.html. But i don't know how to make it log the ip of the person that pushed the submit button.
It logs everything else but id like it to log the ip address too but can't for the life of me figure out how todo it. The form is inside a cgi script also.
Any ideas?.
-
Nov 1, 2000, 11:27 #2
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you need to access the http variables.
REMOTE_ADDR is the IP, so in PHP it'd be $REMOTE_ADDR, cold fusion #REMOTE_ADDR#. Etc
HTTP_USER_AGENT
HTTP_REFERER
are also commonly used ones.
-
Nov 1, 2000, 16:02 #3
thanks but how do i get it to print the remote ip to the log file?.
-
Nov 1, 2000, 16:13 #4
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
the same way you print the other variables you are logging.
You can refer to it just like any other variable.
Bookmarks