Now I have no idea how the hell php works, but you should probably go with the aoTuVb5.7 based oggenc2, found here http://www.rarewares.org/ogg-oggenc.php (Though I heard they merged the aoTuV trunk to libVorbis in 1.3.0, so I guess it doesn't matter which you take)
It needs a .wav input (or .flac ect. main point is that .mp3 doesn't work as is) which might be problematic, but you could use some transcoding thing like besweet that converts it to raw pcm stream before passing it to the encoder...
It needs a .wav input (or .flac ect. main point is that .mp3 doesn't work as is) which might be problematic, but you could use some transcoding thing like besweet that converts it to raw pcm stream before passing it to the encoder...