IR leds and 38KHz receivers as a optoencoder or similiar

nice.. so, shall i use another device in order to achieve what has been written above? if so, which one?