A 100v 400-600nf film capacitor will drop the voltage then rectify it via a diode, the other diode is there so the capacitor can discharge on each cycle...
I'm not sure it's a great technique because if the cap fails, the base of the transistor will see 100v ... hence the optoisolator which...