Detecting IP and sending to webmaster

I run a local website and often I get death threats and unnecessary messages which constitute notification of the ISP. I would like to know how I can set a cookie when the guestbook is signed (if necessary), somehow find the IP, and send the name entered in the "Name" field with the IP of the visitor to my email. I would really like just a long bit of code that would do this that I can put in the page used for signing. Please help, this is urgent. I'm giving all of my points to whoever can do this.
Thanks,
SuperMario
LVL 3
SuperMarioAsked:
Who is Participating?
 
jhurstConnect With a Mentor Commented:
Well, if the problem is eMail you should know where it came from but you can certainly look at the headers and get a pretty good idea.  

In the guestbook, it would seem unlikely that the guistbook does not record ip-addresses.  If it is written in perl as most of them are then you just need to look at and record the environment variable:
REMOTE_ADDR

If this I am missing something then please post the url of the page so we can understand your problem a little better.

0
 
MasseyMCommented:
What kind of server are you on?

0
 
SuperMarioAuthor Commented:
It is run on Angelfire (I believe they allow CGI?)
0
 
jhurstCommented:
How are the threats being passed to you?  Are they being posted into a guestbook or sent to you as eMail?
0
 
SuperMarioAuthor Commented:
Both, actually. They are more prevalent in the guestbook.
0
All Courses

From novice to tech pro — start learning today.