what code you need? the security code or the network unlockcode. if its the security code then try default codes (0000,1234 ) or if you forgot your code then you have to flash your phone to reset the code.
if it is the network unlockcode then first you have to contact your network provider.they may provide you the code for free. if they didnt then u have to buy it from any trusted online vendors.
i would like to recommed unlockgenie. com for that. you can find more sites like this with google