LOL....never thought I would see a "Yeah I have a locked phone that I got from a 'friend' and dont know the code" thread here on WPCentral. I have seen plenty on Android and iOS sites before though.
If you really bought it from your friend, then I am sure your friend will be more than willing to give you the PIN. If he doesnt, then perhaps should give the phone back to who it really belongs to. Asking for help from people on sites such as WPCentral, etc.... to unlock a phone you do not know the code to is frowned upon.