You can only know whether user has liked your fan page or not, by using a facebook app in fan page.
But, you cannot get an FB id on a website by this approach.
But yes, you can know when user has liked the page.
If you are using your own login system and someone likes your webpage. You can actually save that user's value in database.
Subscribe to like button. Whenever a user clicks on like button, it will call a javascript function. You can call a server side page via ajax call from that function , that server side page can update current user as liker of webpage.
Refer this on how to subscribe like button:
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/