Serial codes are not something that can be shared out. A key belongs to one copy of the game, so a code posted online will not register on your machine and passing one around is not allowed.
If the game came from a disc or download, the serial is normally printed on the case, in the manual or in the confirmation email. Buying a legitimate copy is the only way to end up with a code that actually works.