hello, Wondering how i can get a users ip address from the contact us form i use on my hosting site? this is a cgi formmail in html. I would like to get the ip sent along with the mail without the user knowing it but cant seem to find this info on dp or google???? can anyone provide me the code for this or point me in the right direction on how to do this? Im getting some spammers and I want to block them from the server and my contact us form. Thanks much!! Jeff
You can do this server side by getting the http header parameter referrer. Depending on what server language you are using you should ask in that forum. Go take a look here. http://web-sniffer.net/
this is the tag that can be used in formmail to get a users ip. <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER"> Code (markup):