spearte circuits

Hello, i have source of 0-5v output and he has Rin of some Mega ohms and the source has maximum current of 20mA. and i have a destiniation of 0-5v input and he has Rin of some Kohms. i want to connect between the source and the destination with oprocoupler, and i want that when i give, lets say, 3v in the source i will get 3v in the destination ( if i give 2.5v in the source i will get 2.5v in the destination). can you tell me which optocoupler to use and how the circuit looks like?

Thank you,

A source would have an Rout, not an Rin, and it would be a low resistance, not a high one if it could provide 20mA.

With an analog optocoupler you get the LED drive current controlling the output photodiode current. Basically its a current-controlled current source (you operate the output photodiode reverse biased for linear response). Have a look at this datasheet for a linear analog optoisolator: http://www.farnell.com/datasheets/1349773.pdf