Depending on your location and the legal jurisdiction ... and how the current statute is interpreted, it may be illegal for a third party (or you) to unlock your phone. We wouldn't want you to do anything illegal, so please check first if that's the route you wish to take.
The online sites, in my opinion, are all suspect. While they *might* work (and i emphasize "might" because we see a lot of reports about the codes not working and no way to refund/reverse the transaction) the best way is to obtain the unlocking code from the carrier it's locked to. If the phone was purchased under contract they may refuse until the contract is satisfied, or at least until a certain point in the contract.
Call the carrier and ask for the code. If they refuse, ask them why and if you don't think it's a good reason, call back and speak with a different person. Many times they turn you down because they don't know how to do it, or don't want to be bothered. In any case, It never hurts to ask.