How can I capture a contacts IP address from the lead source?

I would like to be able to capture a contacts IP address at the point they become either a visitor or a contact. This has to do with protecting intellectual property and enforcing contracts to stamp that they read and signed an agreement.