IP based Link generator for users

Hi
I have a specific website and I want to give each user a new link to click on(for statistics purposes) for instance I want to link to google.com
but I want to know which user with what IP has clicked on the link so I want to generate a new link for every new IP. Is there any plugin to do this for me (I'm a php programmer but not wordpress so I may be able to modify an existing plugin)