Through some research I thought that I had finally learned how to find the remote address of any given usr viewing a site. I tried using the environmental variable REMOTE_ADDR and I even checked to see how other similar scripts used this variable. I would like to have this tell me the remote usuer's ip but all I seem to get are errors. This piece gives me an error "...Can't find string terminator '"' anywhere before EOF..."
print "your ip: ", $ENV{'REMOTE_ADDR'};
Other pieces however do not give me this error. such as this piece:
print "Server Name: ", $ENV{'SERVER_NAME'};
My goal is to be able to identify users from a log file and add new users using their ip. I am really new to this so I don't know much about all the little tricks to make these things work. I would appreciate some ideas on what I am doing wrong or an alternative I can use.
------------------------------------------------------------
......and why not?
print "your ip: ", $ENV{'REMOTE_ADDR'};
Other pieces however do not give me this error. such as this piece:
print "Server Name: ", $ENV{'SERVER_NAME'};
My goal is to be able to identify users from a log file and add new users using their ip. I am really new to this so I don't know much about all the little tricks to make these things work. I would appreciate some ideas on what I am doing wrong or an alternative I can use.
------------------------------------------------------------
......and why not?