iPhones unlock differently to other handsets.
They can only be unlocked via iTunes as has been said.
With any other phone the network can send you the code directly.
With iPhones you request the unlock to the network. The network then authorises this and sends the request to Apple.
Apple update their database and when you plug your iPhone into iTunes it gets unlocked.
You won't have much luck yet though. It takes 14 days.
My original iPhone 3G was bought on eBay locked to O2. Went on the O2 website, typed in the IMEI and requested unlocking.
Got a message back saying the unlock would take 14 days and there would be no other communication from O2 in between.
Sure enough, on the 14th day I plugged it into iTunes and it popped up a message saying the phone was unlocked!
I had tried nearly everyday before this though and no joy