I don't know about BF2, since FH2 and Project Reality mods use their own master server, so in fact, FH2 multiplayer has very little to do with BF2. AFAIK it is possible to play with a generated key, but don't be surprised if it will be already banned, or you will get "invalid cd-key" error when you will try to connect, because it is possible to use a generated one, but it still have to be an unique key which is not used by any other player online, and wasn't used by any server troll before.
I know that some people don't mind spending few bucks on an old game, but it's getting harder and harder to get the original BF2 CD-key nowadays, so if it's not about the money, you can always try to buy one
here.