$ogline = str_replace(array("\r\n", "\r", "\n"), "",$ogline );

ってこと?