An inexpensive, optical position sensor for measuring a position or length, x, along a one-dimensional curvilinear, coordinate system. The sensor can be used, for example, to determine the position of an interface between a clear and an opaque fluid (such as crude oil and water). In one embodiment, the sensor utilizes the principle of dual-fluorescence, where a primary fiber emits primary fluorescent light and a parallel secondary fiber collects a portion of the primary fluorescent light that is not blocked by the opaque fluid. This, in turn, excites secondary fluorescence in the secondary fiber at a longer wavelength. A light detector measures the intensity of secondary fluorescence emitted from an end of the secondary fiber, which is used to calculate the unknown position or length, x. Side-emitting fibers can be used in place of, or in addition to, fluorescent fibers. The all-optical sensor is attractive for applications involving flammable liquids.