Send IP Address in Contact Form

How would I gather the same information that’s possible in an HTML form? For instance, I would like to get the IP of the sender, such as:

<input type=“hidden” name=“env_report” value=“REMOTE_HOST, REMOTE_ADDR, REMOTE_USER, HTTP_USER_AGENT”>

I’ve been getting so much spam from my Flash site, I have to figure this out.

Anyone know how to add this into a PHP script, or via Actionscript?

thanx!!!