http://www.mspointscodes.com/

i want to make referal codels like that website, i need a html code
please help me!
HOW IT WORKS - Every person who views the website automaticaly gets given a random referal code. i want to no how its been coded
Im soooo confused
Thanks