I've done this several times for maintenance purposes for the gasoline. I use one of those plastic squeeze transfer pumps you can buy for kerosene heaters. Works great.
I got tired of the taste of gasoline from siphoning.
For the oil you are going to have to remove the drain bolt on the crankcase.