Before consonants, it's pronounced [ð?] or even just [ð], e.g. Open the door! ['oupn ð? 'do:].
Before vowels, it's pronounced [ði:] (rhyming with tea) or with a short - [ði], (sounds like this without s), e.g. the only way out [ði 'ounli wei'aut]. It's also pronounced [ði:] when it's not joined with the following word in speech, e.g. With the names o